diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /JavaScriptCore/runtime/JSActivation.cpp | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'JavaScriptCore/runtime/JSActivation.cpp')
-rw-r--r-- | JavaScriptCore/runtime/JSActivation.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/JavaScriptCore/runtime/JSActivation.cpp b/JavaScriptCore/runtime/JSActivation.cpp index 8996629..87adbcd 100644 --- a/JavaScriptCore/runtime/JSActivation.cpp +++ b/JavaScriptCore/runtime/JSActivation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,7 +40,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSActivation); const ClassInfo JSActivation::info = { "JSActivation", 0, 0, 0 }; JSActivation::JSActivation(CallFrame* callFrame, PassRefPtr<FunctionBodyNode> functionBody) - : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame)) + : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame->registers())) { } @@ -49,9 +49,9 @@ JSActivation::~JSActivation() delete d(); } -void JSActivation::mark() +void JSActivation::markChildren(MarkStack& markStack) { - Base::mark(); + Base::markChildren(markStack); Register* registerArray = d()->registerArray.get(); if (!registerArray) @@ -59,25 +59,13 @@ void JSActivation::mark() size_t numParametersMinusThis = d()->functionBody->generatedBytecode().m_numParameters - 1; - size_t i = 0; - size_t count = numParametersMinusThis; - for ( ; i < count; ++i) { - Register& r = registerArray[i]; - if (!r.marked()) - r.mark(); - } + size_t count = numParametersMinusThis; + markStack.appendValues(registerArray, count); size_t numVars = d()->functionBody->generatedBytecode().m_numVars; // Skip the call frame, which sits between the parameters and vars. - i += RegisterFile::CallFrameHeaderSize; - count += RegisterFile::CallFrameHeaderSize + numVars; - - for ( ; i < count; ++i) { - Register& r = registerArray[i]; - if (r.jsValue() && !r.marked()) - r.mark(); - } + markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); } bool JSActivation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |