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

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

Issue 251473004: MIPS: CodeStubs contain their corresponding Isolate* now. (part 2) (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
Patch Set: Created 6 years, 8 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 __ mov(a0, result_register()); 2357 __ mov(a0, result_register());
2358 2358
2359 // Perform combined smi check on both operands. 2359 // Perform combined smi check on both operands.
2360 __ Or(scratch1, left, Operand(right)); 2360 __ Or(scratch1, left, Operand(right));
2361 STATIC_ASSERT(kSmiTag == 0); 2361 STATIC_ASSERT(kSmiTag == 0);
2362 JumpPatchSite patch_site(masm_); 2362 JumpPatchSite patch_site(masm_);
2363 patch_site.EmitJumpIfSmi(scratch1, &smi_case); 2363 patch_site.EmitJumpIfSmi(scratch1, &smi_case);
2364 2364
2365 __ bind(&stub_call); 2365 __ bind(&stub_call);
2366 BinaryOpICStub stub(isolate(), op, mode); 2366 BinaryOpICStub stub(isolate(), op, mode);
2367 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); 2367 CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId());
2368 patch_site.EmitPatchInfo(); 2368 patch_site.EmitPatchInfo();
2369 __ jmp(&done); 2369 __ jmp(&done);
2370 2370
2371 __ bind(&smi_case); 2371 __ bind(&smi_case);
2372 // Smi case. This code works the same way as the smi-smi case in the type 2372 // Smi case. This code works the same way as the smi-smi case in the type
2373 // recording binary operation stub, see 2373 // recording binary operation stub, see
2374 switch (op) { 2374 switch (op) {
2375 case Token::SAR: 2375 case Token::SAR:
2376 __ GetLeastBitsFromSmi(scratch1, right, 5); 2376 __ GetLeastBitsFromSmi(scratch1, right, 5);
2377 __ srav(right, left, scratch1); 2377 __ srav(right, left, scratch1);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 } 2436 }
2437 2437
2438 2438
2439 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, 2439 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr,
2440 Token::Value op, 2440 Token::Value op,
2441 OverwriteMode mode) { 2441 OverwriteMode mode) {
2442 __ mov(a0, result_register()); 2442 __ mov(a0, result_register());
2443 __ pop(a1); 2443 __ pop(a1);
2444 BinaryOpICStub stub(isolate(), op, mode); 2444 BinaryOpICStub stub(isolate(), op, mode);
2445 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2445 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2446 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); 2446 CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId());
2447 patch_site.EmitPatchInfo(); 2447 patch_site.EmitPatchInfo();
2448 context()->Plug(v0); 2448 context()->Plug(v0);
2449 } 2449 }
2450 2450
2451 2451
2452 void FullCodeGenerator::EmitAssignment(Expression* expr) { 2452 void FullCodeGenerator::EmitAssignment(Expression* expr) {
2453 ASSERT(expr->IsValidReferenceExpression()); 2453 ASSERT(expr->IsValidReferenceExpression());
2454 2454
2455 // Left-hand side can only be a property, a global or a (parameter or local) 2455 // Left-hand side can only be a property, a global or a (parameter or local)
2456 // slot. 2456 // slot.
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(), 2950 StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(),
2951 isolate()->factory()->NewAllocationSite()); 2951 isolate()->factory()->NewAllocationSite());
2952 ASSERT(expr->AllocationSiteFeedbackSlot() == 2952 ASSERT(expr->AllocationSiteFeedbackSlot() ==
2953 expr->CallNewFeedbackSlot() + 1); 2953 expr->CallNewFeedbackSlot() + 1);
2954 } 2954 }
2955 2955
2956 __ li(a2, FeedbackVector()); 2956 __ li(a2, FeedbackVector());
2957 __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); 2957 __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
2958 2958
2959 CallConstructStub stub(isolate(), RECORD_CALL_TARGET); 2959 CallConstructStub stub(isolate(), RECORD_CALL_TARGET);
2960 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); 2960 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
2961 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2961 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2962 context()->Plug(v0); 2962 context()->Plug(v0);
2963 } 2963 }
2964 2964
2965 2965
2966 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 2966 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
2967 ZoneList<Expression*>* args = expr->arguments(); 2967 ZoneList<Expression*>* args = expr->arguments();
2968 ASSERT(args->length() == 1); 2968 ASSERT(args->length() == 1);
2969 2969
2970 VisitForAccumulatorValue(args->at(0)); 2970 VisitForAccumulatorValue(args->at(0));
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
4460 } 4460 }
4461 4461
4462 __ bind(&stub_call); 4462 __ bind(&stub_call);
4463 __ mov(a1, v0); 4463 __ mov(a1, v0);
4464 __ li(a0, Operand(Smi::FromInt(count_value))); 4464 __ li(a0, Operand(Smi::FromInt(count_value)));
4465 4465
4466 // Record position before stub call. 4466 // Record position before stub call.
4467 SetSourcePosition(expr->position()); 4467 SetSourcePosition(expr->position());
4468 4468
4469 BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); 4469 BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE);
4470 CallIC(stub.GetCode(isolate()), expr->CountBinOpFeedbackId()); 4470 CallIC(stub.GetCode(), expr->CountBinOpFeedbackId());
4471 patch_site.EmitPatchInfo(); 4471 patch_site.EmitPatchInfo();
4472 __ bind(&done); 4472 __ bind(&done);
4473 4473
4474 // Store the value returned in v0. 4474 // Store the value returned in v0.
4475 switch (assign_type) { 4475 switch (assign_type) {
4476 case VARIABLE: 4476 case VARIABLE:
4477 if (expr->is_postfix()) { 4477 if (expr->is_postfix()) {
4478 { EffectContext context(this); 4478 { EffectContext context(this);
4479 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 4479 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
4480 Token::ASSIGN); 4480 Token::ASSIGN);
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
4966 Assembler::target_address_at(pc_immediate_load_address)) == 4966 Assembler::target_address_at(pc_immediate_load_address)) ==
4967 reinterpret_cast<uint32_t>( 4967 reinterpret_cast<uint32_t>(
4968 isolate->builtins()->OsrAfterStackCheck()->entry())); 4968 isolate->builtins()->OsrAfterStackCheck()->entry()));
4969 return OSR_AFTER_STACK_CHECK; 4969 return OSR_AFTER_STACK_CHECK;
4970 } 4970 }
4971 4971
4972 4972
4973 } } // namespace v8::internal 4973 } } // namespace v8::internal
4974 4974
4975 #endif // V8_TARGET_ARCH_MIPS 4975 #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