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

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

Issue 1199493002: Revert relanded strong property access CL (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next" 2222 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next"
2223 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter 2223 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter
2224 __ Push(load_name, a3, a0); // "next", iter, received 2224 __ Push(load_name, a3, a0); // "next", iter, received
2225 2225
2226 // result = receiver[f](arg); 2226 // result = receiver[f](arg);
2227 __ bind(&l_call); 2227 __ bind(&l_call);
2228 __ lw(load_receiver, MemOperand(sp, kPointerSize)); 2228 __ lw(load_receiver, MemOperand(sp, kPointerSize));
2229 __ lw(load_name, MemOperand(sp, 2 * kPointerSize)); 2229 __ lw(load_name, MemOperand(sp, 2 * kPointerSize));
2230 __ li(LoadDescriptor::SlotRegister(), 2230 __ li(LoadDescriptor::SlotRegister(),
2231 Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot()))); 2231 Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
2232 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), SLOPPY).code(); 2232 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
2233 CallIC(ic, TypeFeedbackId::None()); 2233 CallIC(ic, TypeFeedbackId::None());
2234 __ mov(a0, v0); 2234 __ mov(a0, v0);
2235 __ mov(a1, a0); 2235 __ mov(a1, a0);
2236 __ sw(a1, MemOperand(sp, 2 * kPointerSize)); 2236 __ sw(a1, MemOperand(sp, 2 * kPointerSize));
2237 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); 2237 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD);
2238 __ CallStub(&stub); 2238 __ CallStub(&stub);
2239 2239
2240 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2240 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2241 __ Drop(1); // The function is still on the stack; drop it. 2241 __ Drop(1); // The function is still on the stack; drop it.
2242 2242
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 2393
2394 2394
2395 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 2395 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
2396 SetSourcePosition(prop->position()); 2396 SetSourcePosition(prop->position());
2397 Literal* key = prop->key()->AsLiteral(); 2397 Literal* key = prop->key()->AsLiteral();
2398 DCHECK(!prop->IsSuperAccess()); 2398 DCHECK(!prop->IsSuperAccess());
2399 2399
2400 __ li(LoadDescriptor::NameRegister(), Operand(key->value())); 2400 __ li(LoadDescriptor::NameRegister(), Operand(key->value()));
2401 __ li(LoadDescriptor::SlotRegister(), 2401 __ li(LoadDescriptor::SlotRegister(),
2402 Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); 2402 Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
2403 CallLoadIC(NOT_CONTEXTUAL, language_mode()); 2403 CallLoadIC(NOT_CONTEXTUAL);
2404 } 2404 }
2405 2405
2406 2406
2407 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { 2407 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
2408 // Stack: receiver, home_object. 2408 // Stack: receiver, home_object.
2409 SetSourcePosition(prop->position()); 2409 SetSourcePosition(prop->position());
2410 Literal* key = prop->key()->AsLiteral(); 2410 Literal* key = prop->key()->AsLiteral();
2411 DCHECK(!key->value()->IsSmi()); 2411 DCHECK(!key->value()->IsSmi());
2412 DCHECK(prop->IsSuperAccess()); 2412 DCHECK(prop->IsSuperAccess());
2413 2413
2414 __ Push(key->value()); 2414 __ Push(key->value());
2415 __ Push(Smi::FromInt(language_mode())); 2415 __ CallRuntime(Runtime::kLoadFromSuper, 3);
2416 __ CallRuntime(Runtime::kLoadFromSuper, 4);
2417 } 2416 }
2418 2417
2419 2418
2420 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 2419 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
2421 SetSourcePosition(prop->position()); 2420 SetSourcePosition(prop->position());
2422 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code(); 2421 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
2423 __ li(LoadDescriptor::SlotRegister(), 2422 __ li(LoadDescriptor::SlotRegister(),
2424 Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); 2423 Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
2425 CallIC(ic); 2424 CallIC(ic);
2426 } 2425 }
2427 2426
2428 2427
2429 void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) { 2428 void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
2430 // Stack: receiver, home_object, key. 2429 // Stack: receiver, home_object, key.
2431 __ Push(Smi::FromInt(language_mode()));
2432 SetSourcePosition(prop->position()); 2430 SetSourcePosition(prop->position());
2433 2431
2434 __ CallRuntime(Runtime::kLoadKeyedFromSuper, 4); 2432 __ CallRuntime(Runtime::kLoadKeyedFromSuper, 3);
2435 } 2433 }
2436 2434
2437 2435
2438 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, 2436 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
2439 Token::Value op, 2437 Token::Value op,
2440 Expression* left_expr, 2438 Expression* left_expr,
2441 Expression* right_expr) { 2439 Expression* right_expr) {
2442 Label done, smi_case, stub_call; 2440 Label done, smi_case, stub_call;
2443 2441
2444 Register scratch1 = a2; 2442 Register scratch1 = a2;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 Literal* key = prop->key()->AsLiteral(); 2968 Literal* key = prop->key()->AsLiteral();
2971 DCHECK(!key->value()->IsSmi()); 2969 DCHECK(!key->value()->IsSmi());
2972 // Load the function from the receiver. 2970 // Load the function from the receiver.
2973 const Register scratch = a1; 2971 const Register scratch = a1;
2974 SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); 2972 SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference();
2975 VisitForAccumulatorValue(super_ref->home_object()); 2973 VisitForAccumulatorValue(super_ref->home_object());
2976 __ mov(scratch, v0); 2974 __ mov(scratch, v0);
2977 VisitForAccumulatorValue(super_ref->this_var()); 2975 VisitForAccumulatorValue(super_ref->this_var());
2978 __ Push(scratch, v0, v0, scratch); 2976 __ Push(scratch, v0, v0, scratch);
2979 __ Push(key->value()); 2977 __ Push(key->value());
2980 __ Push(Smi::FromInt(language_mode()));
2981 2978
2982 // Stack here: 2979 // Stack here:
2983 // - home_object 2980 // - home_object
2984 // - this (receiver) 2981 // - this (receiver)
2985 // - this (receiver) <-- LoadFromSuper will pop here and below. 2982 // - this (receiver) <-- LoadFromSuper will pop here and below.
2986 // - home_object 2983 // - home_object
2987 // - key 2984 // - key
2988 // - language_mode 2985 __ CallRuntime(Runtime::kLoadFromSuper, 3);
2989 __ CallRuntime(Runtime::kLoadFromSuper, 4);
2990 2986
2991 // Replace home_object with target function. 2987 // Replace home_object with target function.
2992 __ sw(v0, MemOperand(sp, kPointerSize)); 2988 __ sw(v0, MemOperand(sp, kPointerSize));
2993 2989
2994 // Stack here: 2990 // Stack here:
2995 // - target function 2991 // - target function
2996 // - this (receiver) 2992 // - this (receiver)
2997 EmitCall(expr, CallICState::METHOD); 2993 EmitCall(expr, CallICState::METHOD);
2998 } 2994 }
2999 2995
(...skipping 30 matching lines...) Expand all
3030 3026
3031 SetSourcePosition(prop->position()); 3027 SetSourcePosition(prop->position());
3032 // Load the function from the receiver. 3028 // Load the function from the receiver.
3033 const Register scratch = a1; 3029 const Register scratch = a1;
3034 SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference(); 3030 SuperPropertyReference* super_ref = prop->obj()->AsSuperPropertyReference();
3035 VisitForAccumulatorValue(super_ref->home_object()); 3031 VisitForAccumulatorValue(super_ref->home_object());
3036 __ Move(scratch, v0); 3032 __ Move(scratch, v0);
3037 VisitForAccumulatorValue(super_ref->this_var()); 3033 VisitForAccumulatorValue(super_ref->this_var());
3038 __ Push(scratch, v0, v0, scratch); 3034 __ Push(scratch, v0, v0, scratch);
3039 VisitForStackValue(prop->key()); 3035 VisitForStackValue(prop->key());
3040 __ Push(Smi::FromInt(language_mode()));
3041 3036
3042 // Stack here: 3037 // Stack here:
3043 // - home_object 3038 // - home_object
3044 // - this (receiver) 3039 // - this (receiver)
3045 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. 3040 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
3046 // - home_object 3041 // - home_object
3047 // - key 3042 // - key
3048 // - language_mode 3043 __ CallRuntime(Runtime::kLoadKeyedFromSuper, 3);
3049 __ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
3050 3044
3051 // Replace home_object with target function. 3045 // Replace home_object with target function.
3052 __ sw(v0, MemOperand(sp, kPointerSize)); 3046 __ sw(v0, MemOperand(sp, kPointerSize));
3053 3047
3054 // Stack here: 3048 // Stack here:
3055 // - target function 3049 // - target function
3056 // - this (receiver) 3050 // - this (receiver)
3057 EmitCall(expr, CallICState::METHOD); 3051 EmitCall(expr, CallICState::METHOD);
3058 } 3052 }
3059 3053
(...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
5566 reinterpret_cast<uint32_t>( 5560 reinterpret_cast<uint32_t>(
5567 isolate->builtins()->OsrAfterStackCheck()->entry())); 5561 isolate->builtins()->OsrAfterStackCheck()->entry()));
5568 return OSR_AFTER_STACK_CHECK; 5562 return OSR_AFTER_STACK_CHECK;
5569 } 5563 }
5570 5564
5571 5565
5572 } // namespace internal 5566 } // namespace internal
5573 } // namespace v8 5567 } // namespace v8
5574 5568
5575 #endif // V8_TARGET_ARCH_MIPS 5569 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698