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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 962263002: Disallow subclassing Arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes for debug-code issues 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/arm64/full-codegen-arm64.cc ('k') | src/ia32/code-stubs-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 void Builtins::Generate_ArrayCode(MacroAssembler* masm) { 1185 void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
1186 // ----------- S t a t e ------------- 1186 // ----------- S t a t e -------------
1187 // -- eax : argc 1187 // -- eax : argc
1188 // -- esp[0] : return address 1188 // -- esp[0] : return address
1189 // -- esp[4] : last argument 1189 // -- esp[4] : last argument
1190 // ----------------------------------- 1190 // -----------------------------------
1191 Label generic_array_code; 1191 Label generic_array_code;
1192 1192
1193 // Get the Array function. 1193 // Get the Array function.
1194 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); 1194 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi);
1195 __ mov(edx, edi);
1195 1196
1196 if (FLAG_debug_code) { 1197 if (FLAG_debug_code) {
1197 // Initial map for the builtin Array function should be a map. 1198 // Initial map for the builtin Array function should be a map.
1198 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); 1199 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset));
1199 // Will both indicate a NULL and a Smi. 1200 // Will both indicate a NULL and a Smi.
1200 __ test(ebx, Immediate(kSmiTagMask)); 1201 __ test(ebx, Immediate(kSmiTagMask));
1201 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); 1202 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction);
1202 __ CmpObjectType(ebx, MAP_TYPE, ecx); 1203 __ CmpObjectType(ebx, MAP_TYPE, ecx);
1203 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); 1204 __ Assert(equal, kUnexpectedInitialMapForArrayFunction);
1204 } 1205 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 1549
1549 __ bind(&ok); 1550 __ bind(&ok);
1550 __ ret(0); 1551 __ ret(0);
1551 } 1552 }
1552 1553
1553 #undef __ 1554 #undef __
1554 } 1555 }
1555 } // namespace v8::internal 1556 } // namespace v8::internal
1556 1557
1557 #endif // V8_TARGET_ARCH_IA32 1558 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698