| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
| 7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
| 10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 switch (ArchOpcodeField::decode(opcode)) { | 401 switch (ArchOpcodeField::decode(opcode)) { |
| 402 case kArchCallCodeObject: { | 402 case kArchCallCodeObject: { |
| 403 EnsureSpaceForLazyDeopt(); | 403 EnsureSpaceForLazyDeopt(); |
| 404 if (instr->InputAt(0)->IsImmediate()) { | 404 if (instr->InputAt(0)->IsImmediate()) { |
| 405 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), | 405 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
| 406 RelocInfo::CODE_TARGET); | 406 RelocInfo::CODE_TARGET); |
| 407 } else { | 407 } else { |
| 408 __ daddiu(at, i.InputRegister(0), Code::kHeaderSize - kHeapObjectTag); | 408 __ daddiu(at, i.InputRegister(0), Code::kHeaderSize - kHeapObjectTag); |
| 409 __ Call(at); | 409 __ Call(at); |
| 410 } | 410 } |
| 411 AddSafepointAndDeopt(instr); | 411 RecordCallPosition(instr); |
| 412 break; | 412 break; |
| 413 } | 413 } |
| 414 case kArchCallJSFunction: { | 414 case kArchCallJSFunction: { |
| 415 EnsureSpaceForLazyDeopt(); | 415 EnsureSpaceForLazyDeopt(); |
| 416 Register func = i.InputRegister(0); | 416 Register func = i.InputRegister(0); |
| 417 if (FLAG_debug_code) { | 417 if (FLAG_debug_code) { |
| 418 // Check the function's context matches the context argument. | 418 // Check the function's context matches the context argument. |
| 419 __ ld(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); | 419 __ ld(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); |
| 420 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg)); | 420 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg)); |
| 421 } | 421 } |
| 422 | 422 |
| 423 __ ld(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 423 __ ld(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 424 __ Call(at); | 424 __ Call(at); |
| 425 AddSafepointAndDeopt(instr); | 425 RecordCallPosition(instr); |
| 426 break; | 426 break; |
| 427 } | 427 } |
| 428 case kArchJmp: | 428 case kArchJmp: |
| 429 AssembleArchJump(i.InputRpo(0)); | 429 AssembleArchJump(i.InputRpo(0)); |
| 430 break; | 430 break; |
| 431 case kArchLookupSwitch: | 431 case kArchLookupSwitch: |
| 432 AssembleArchLookupSwitch(instr); | 432 AssembleArchLookupSwitch(instr); |
| 433 break; | 433 break; |
| 434 case kArchTableSwitch: | 434 case kArchTableSwitch: |
| 435 AssembleArchTableSwitch(instr); | 435 AssembleArchTableSwitch(instr); |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 } | 1358 } |
| 1359 } | 1359 } |
| 1360 MarkLazyDeoptSite(); | 1360 MarkLazyDeoptSite(); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 #undef __ | 1363 #undef __ |
| 1364 | 1364 |
| 1365 } // namespace compiler | 1365 } // namespace compiler |
| 1366 } // namespace internal | 1366 } // namespace internal |
| 1367 } // namespace v8 | 1367 } // namespace v8 |
| OLD | NEW |