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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Isolate::js_builtins_object Created 5 years, 3 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/contexts.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 int locals_count = info->scope()->num_stack_slots(); 149 int locals_count = info->scope()->num_stack_slots();
150 // Generators allocate locals, if any, in context slots. 150 // Generators allocate locals, if any, in context slots.
151 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 151 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
152 if (locals_count > 0) { 152 if (locals_count > 0) {
153 if (locals_count >= 128) { 153 if (locals_count >= 128) {
154 Label ok; 154 Label ok;
155 __ sub(r9, sp, Operand(locals_count * kPointerSize)); 155 __ sub(r9, sp, Operand(locals_count * kPointerSize));
156 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex); 156 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
157 __ cmp(r9, Operand(r2)); 157 __ cmp(r9, Operand(r2));
158 __ b(hs, &ok); 158 __ b(hs, &ok);
159 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); 159 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION);
160 __ bind(&ok); 160 __ bind(&ok);
161 } 161 }
162 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); 162 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex);
163 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32; 163 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32;
164 if (locals_count >= kMaxPushes) { 164 if (locals_count >= kMaxPushes) {
165 int loop_iterations = locals_count / kMaxPushes; 165 int loop_iterations = locals_count / kMaxPushes;
166 __ mov(r2, Operand(loop_iterations)); 166 __ mov(r2, Operand(loop_iterations));
167 Label loop_header; 167 Label loop_header;
168 __ bind(&loop_header); 168 __ bind(&loop_header);
169 // Do pushes. 169 // Do pushes.
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 __ pop(); // literal index 1901 __ pop(); // literal index
1902 __ Pop(r0); 1902 __ Pop(r0);
1903 result_saved = false; 1903 result_saved = false;
1904 } 1904 }
1905 for (; array_index < length; array_index++) { 1905 for (; array_index < length; array_index++) {
1906 Expression* subexpr = subexprs->at(array_index); 1906 Expression* subexpr = subexprs->at(array_index);
1907 1907
1908 __ Push(r0); 1908 __ Push(r0);
1909 if (subexpr->IsSpread()) { 1909 if (subexpr->IsSpread()) {
1910 VisitForStackValue(subexpr->AsSpread()->expression()); 1910 VisitForStackValue(subexpr->AsSpread()->expression());
1911 __ InvokeBuiltin(Builtins::CONCAT_ITERABLE_TO_ARRAY, CALL_FUNCTION); 1911 __ InvokeBuiltin(Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX,
1912 CALL_FUNCTION);
1912 } else { 1913 } else {
1913 VisitForStackValue(subexpr); 1914 VisitForStackValue(subexpr);
1914 __ CallRuntime(Runtime::kAppendElement, 2); 1915 __ CallRuntime(Runtime::kAppendElement, 2);
1915 } 1916 }
1916 1917
1917 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); 1918 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
1918 } 1919 }
1919 1920
1920 if (result_saved) { 1921 if (result_saved) {
1921 __ pop(); // literal index 1922 __ pop(); // literal index
(...skipping 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 Label* if_false = NULL; 5043 Label* if_false = NULL;
5043 Label* fall_through = NULL; 5044 Label* fall_through = NULL;
5044 context()->PrepareTest(&materialize_true, &materialize_false, 5045 context()->PrepareTest(&materialize_true, &materialize_false,
5045 &if_true, &if_false, &fall_through); 5046 &if_true, &if_false, &fall_through);
5046 5047
5047 Token::Value op = expr->op(); 5048 Token::Value op = expr->op();
5048 VisitForStackValue(expr->left()); 5049 VisitForStackValue(expr->left());
5049 switch (op) { 5050 switch (op) {
5050 case Token::IN: 5051 case Token::IN:
5051 VisitForStackValue(expr->right()); 5052 VisitForStackValue(expr->right());
5052 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 5053 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION);
5053 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5054 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5054 __ CompareRoot(r0, Heap::kTrueValueRootIndex); 5055 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
5055 Split(eq, if_true, if_false, fall_through); 5056 Split(eq, if_true, if_false, fall_through);
5056 break; 5057 break;
5057 5058
5058 case Token::INSTANCEOF: { 5059 case Token::INSTANCEOF: {
5059 VisitForAccumulatorValue(expr->right()); 5060 VisitForAccumulatorValue(expr->right());
5060 __ pop(r1); 5061 __ pop(r1);
5061 InstanceOfStub stub(isolate()); 5062 InstanceOfStub stub(isolate());
5062 __ CallStub(&stub); 5063 __ CallStub(&stub);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
5376 DCHECK(interrupt_address == 5377 DCHECK(interrupt_address ==
5377 isolate->builtins()->OsrAfterStackCheck()->entry()); 5378 isolate->builtins()->OsrAfterStackCheck()->entry());
5378 return OSR_AFTER_STACK_CHECK; 5379 return OSR_AFTER_STACK_CHECK;
5379 } 5380 }
5380 5381
5381 5382
5382 } // namespace internal 5383 } // namespace internal
5383 } // namespace v8 5384 } // namespace v8
5384 5385
5385 #endif // V8_TARGET_ARCH_ARM 5386 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698