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

Side by Side Diff: src/arm/builtins-arm.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 | « no previous file | src/arm/code-stubs-arm.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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 if (FLAG_debug_code) { 123 if (FLAG_debug_code) {
124 // Initial map for the builtin Array functions should be maps. 124 // Initial map for the builtin Array functions should be maps.
125 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); 125 __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
126 __ SmiTst(r2); 126 __ SmiTst(r2);
127 __ Assert(ne, kUnexpectedInitialMapForArrayFunction); 127 __ Assert(ne, kUnexpectedInitialMapForArrayFunction);
128 __ CompareObjectType(r2, r3, r4, MAP_TYPE); 128 __ CompareObjectType(r2, r3, r4, MAP_TYPE);
129 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); 129 __ Assert(eq, kUnexpectedInitialMapForArrayFunction);
130 } 130 }
131 131
132 __ mov(r3, r1);
132 // Run the native code for the Array function called as a normal function. 133 // Run the native code for the Array function called as a normal function.
133 // tail call a stub 134 // tail call a stub
134 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 135 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
135 ArrayConstructorStub stub(masm->isolate()); 136 ArrayConstructorStub stub(masm->isolate());
136 __ TailCallStub(&stub); 137 __ TailCallStub(&stub);
137 } 138 }
138 139
139 140
140 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { 141 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
141 // ----------- S t a t e ------------- 142 // ----------- S t a t e -------------
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 __ bkpt(0); 1653 __ bkpt(0);
1653 } 1654 }
1654 } 1655 }
1655 1656
1656 1657
1657 #undef __ 1658 #undef __
1658 1659
1659 } } // namespace v8::internal 1660 } } // namespace v8::internal
1660 1661
1661 #endif // V8_TARGET_ARCH_ARM 1662 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698