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

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

Issue 965053002: Revert of Disallow subclassing Arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/code-stubs-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);
1196 1195
1197 if (FLAG_debug_code) { 1196 if (FLAG_debug_code) {
1198 // Initial map for the builtin Array function should be a map. 1197 // Initial map for the builtin Array function should be a map.
1199 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); 1198 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset));
1200 // Will both indicate a NULL and a Smi. 1199 // Will both indicate a NULL and a Smi.
1201 __ test(ebx, Immediate(kSmiTagMask)); 1200 __ test(ebx, Immediate(kSmiTagMask));
1202 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); 1201 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction);
1203 __ CmpObjectType(ebx, MAP_TYPE, ecx); 1202 __ CmpObjectType(ebx, MAP_TYPE, ecx);
1204 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); 1203 __ Assert(equal, kUnexpectedInitialMapForArrayFunction);
1205 } 1204 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 1548
1550 __ bind(&ok); 1549 __ bind(&ok);
1551 __ ret(0); 1550 __ ret(0);
1552 } 1551 }
1553 1552
1554 #undef __ 1553 #undef __
1555 } 1554 }
1556 } // namespace v8::internal 1555 } // namespace v8::internal
1557 1556
1558 #endif // V8_TARGET_ARCH_IA32 1557 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698