Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: src/runtime/runtime-scopes.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | src/type-info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/runtime/runtime-utils.h" 10 #include "src/runtime/runtime-utils.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 static Object* ComputeReceiverForNonGlobal(Isolate* isolate, JSObject* holder) { 856 static Object* ComputeReceiverForNonGlobal(Isolate* isolate, JSObject* holder) {
857 DCHECK(!holder->IsGlobalObject()); 857 DCHECK(!holder->IsGlobalObject());
858 Context* top = isolate->context(); 858 Context* top = isolate->context();
859 // Get the context extension function. 859 // Get the context extension function.
860 JSFunction* context_extension_function = 860 JSFunction* context_extension_function =
861 top->native_context()->context_extension_function(); 861 top->native_context()->context_extension_function();
862 // If the holder isn't a context extension object, we just return it 862 // If the holder isn't a context extension object, we just return it
863 // as the receiver. This allows arguments objects to be used as 863 // as the receiver. This allows arguments objects to be used as
864 // receivers, but only if they are put in the context scope chain 864 // receivers, but only if they are put in the context scope chain
865 // explicitly via a with-statement. 865 // explicitly via a with-statement.
866 Object* constructor = holder->map()->constructor(); 866 Object* constructor = holder->map()->GetConstructor();
867 if (constructor != context_extension_function) return holder; 867 if (constructor != context_extension_function) return holder;
868 // Fall back to using the global object as the implicit receiver if 868 // Fall back to using the global object as the implicit receiver if
869 // the property turns out to be a local variable allocated in a 869 // the property turns out to be a local variable allocated in a
870 // context extension object - introduced via eval. 870 // context extension object - introduced via eval.
871 return isolate->heap()->undefined_value(); 871 return isolate->heap()->undefined_value();
872 } 872 }
873 873
874 874
875 static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate, 875 static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate,
876 bool throw_error) { 876 bool throw_error) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 return Smi::FromInt(frame->GetArgumentsLength()); 1122 return Smi::FromInt(frame->GetArgumentsLength());
1123 } 1123 }
1124 1124
1125 1125
1126 RUNTIME_FUNCTION(RuntimeReference_Arguments) { 1126 RUNTIME_FUNCTION(RuntimeReference_Arguments) {
1127 SealHandleScope shs(isolate); 1127 SealHandleScope shs(isolate);
1128 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); 1128 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate);
1129 } 1129 }
1130 } 1130 }
1131 } // namespace v8::internal 1131 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698