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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 { Comment cmnt(masm_, "[ Allocate locals"); 153 { Comment cmnt(masm_, "[ Allocate locals");
154 int locals_count = info->scope()->num_stack_slots(); 154 int locals_count = info->scope()->num_stack_slots();
155 // Generators allocate locals, if any, in context slots. 155 // Generators allocate locals, if any, in context slots.
156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
157 if (locals_count > 0) { 157 if (locals_count > 0) {
158 if (locals_count >= 128) { 158 if (locals_count >= 128) {
159 Label ok; 159 Label ok;
160 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); 160 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize));
161 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); 161 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
162 __ Branch(&ok, hs, t1, Operand(a2)); 162 __ Branch(&ok, hs, t1, Operand(a2));
163 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); 163 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION);
164 __ bind(&ok); 164 __ bind(&ok);
165 } 165 }
166 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); 166 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex);
167 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32; 167 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32;
168 if (locals_count >= kMaxPushes) { 168 if (locals_count >= kMaxPushes) {
169 int loop_iterations = locals_count / kMaxPushes; 169 int loop_iterations = locals_count / kMaxPushes;
170 __ li(a2, Operand(loop_iterations)); 170 __ li(a2, Operand(loop_iterations));
171 Label loop_header; 171 Label loop_header;
172 __ bind(&loop_header); 172 __ bind(&loop_header);
173 // Do pushes. 173 // Do pushes.
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 __ Pop(); // literal index 1897 __ Pop(); // literal index
1898 __ Pop(v0); 1898 __ Pop(v0);
1899 result_saved = false; 1899 result_saved = false;
1900 } 1900 }
1901 for (; array_index < length; array_index++) { 1901 for (; array_index < length; array_index++) {
1902 Expression* subexpr = subexprs->at(array_index); 1902 Expression* subexpr = subexprs->at(array_index);
1903 1903
1904 __ Push(v0); 1904 __ Push(v0);
1905 if (subexpr->IsSpread()) { 1905 if (subexpr->IsSpread()) {
1906 VisitForStackValue(subexpr->AsSpread()->expression()); 1906 VisitForStackValue(subexpr->AsSpread()->expression());
1907 __ InvokeBuiltin(Builtins::CONCAT_ITERABLE_TO_ARRAY, CALL_FUNCTION); 1907 __ InvokeBuiltin(Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX,
1908 CALL_FUNCTION);
1908 } else { 1909 } else {
1909 VisitForStackValue(subexpr); 1910 VisitForStackValue(subexpr);
1910 __ CallRuntime(Runtime::kAppendElement, 2); 1911 __ CallRuntime(Runtime::kAppendElement, 2);
1911 } 1912 }
1912 1913
1913 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS); 1914 PrepareForBailoutForId(expr->GetIdForElement(array_index), NO_REGISTERS);
1914 } 1915 }
1915 1916
1916 if (result_saved) { 1917 if (result_saved) {
1917 __ Pop(); // literal index 1918 __ Pop(); // literal index
(...skipping 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 Label* if_false = NULL; 5072 Label* if_false = NULL;
5072 Label* fall_through = NULL; 5073 Label* fall_through = NULL;
5073 context()->PrepareTest(&materialize_true, &materialize_false, 5074 context()->PrepareTest(&materialize_true, &materialize_false,
5074 &if_true, &if_false, &fall_through); 5075 &if_true, &if_false, &fall_through);
5075 5076
5076 Token::Value op = expr->op(); 5077 Token::Value op = expr->op();
5077 VisitForStackValue(expr->left()); 5078 VisitForStackValue(expr->left());
5078 switch (op) { 5079 switch (op) {
5079 case Token::IN: 5080 case Token::IN:
5080 VisitForStackValue(expr->right()); 5081 VisitForStackValue(expr->right());
5081 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 5082 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION);
5082 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5083 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5083 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 5084 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5084 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 5085 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5085 break; 5086 break;
5086 5087
5087 case Token::INSTANCEOF: { 5088 case Token::INSTANCEOF: {
5088 VisitForAccumulatorValue(expr->right()); 5089 VisitForAccumulatorValue(expr->right());
5089 __ mov(a0, result_register()); 5090 __ mov(a0, result_register());
5090 __ pop(a1); 5091 __ pop(a1);
5091 InstanceOfStub stub(isolate()); 5092 InstanceOfStub stub(isolate());
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 reinterpret_cast<uint64_t>( 5350 reinterpret_cast<uint64_t>(
5350 isolate->builtins()->OsrAfterStackCheck()->entry())); 5351 isolate->builtins()->OsrAfterStackCheck()->entry()));
5351 return OSR_AFTER_STACK_CHECK; 5352 return OSR_AFTER_STACK_CHECK;
5352 } 5353 }
5353 5354
5354 5355
5355 } // namespace internal 5356 } // namespace internal
5356 } // namespace v8 5357 } // namespace v8
5357 5358
5358 #endif // V8_TARGET_ARCH_MIPS64 5359 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698