| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // Check the function's context matches the context argument. | 456 // Check the function's context matches the context argument. |
| 457 __ lw(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); | 457 __ lw(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); |
| 458 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg)); | 458 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg)); |
| 459 } | 459 } |
| 460 | 460 |
| 461 AssembleDeconstructActivationRecord(); | 461 AssembleDeconstructActivationRecord(); |
| 462 __ lw(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 462 __ lw(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 463 __ Jump(at); | 463 __ Jump(at); |
| 464 break; | 464 break; |
| 465 } | 465 } |
| 466 case kArchPrepareCallCFunction: { |
| 467 int const num_parameters = MiscField::decode(instr->opcode()); |
| 468 __ PrepareCallCFunction(num_parameters, kScratchReg); |
| 469 break; |
| 470 } |
| 471 case kArchCallCFunction: { |
| 472 int const num_parameters = MiscField::decode(instr->opcode()); |
| 473 if (instr->InputAt(0)->IsImmediate()) { |
| 474 ExternalReference ref = i.InputExternalReference(0); |
| 475 __ CallCFunction(ref, num_parameters); |
| 476 } else { |
| 477 Register func = i.InputRegister(0); |
| 478 __ CallCFunction(func, num_parameters); |
| 479 } |
| 480 break; |
| 481 } |
| 466 case kArchJmp: | 482 case kArchJmp: |
| 467 AssembleArchJump(i.InputRpo(0)); | 483 AssembleArchJump(i.InputRpo(0)); |
| 468 break; | 484 break; |
| 469 case kArchLookupSwitch: | 485 case kArchLookupSwitch: |
| 470 AssembleArchLookupSwitch(instr); | 486 AssembleArchLookupSwitch(instr); |
| 471 break; | 487 break; |
| 472 case kArchTableSwitch: | 488 case kArchTableSwitch: |
| 473 AssembleArchTableSwitch(instr); | 489 AssembleArchTableSwitch(instr); |
| 474 break; | 490 break; |
| 475 case kArchNop: | 491 case kArchNop: |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 } | 1357 } |
| 1342 } | 1358 } |
| 1343 } | 1359 } |
| 1344 } | 1360 } |
| 1345 | 1361 |
| 1346 #undef __ | 1362 #undef __ |
| 1347 | 1363 |
| 1348 } // namespace compiler | 1364 } // namespace compiler |
| 1349 } // namespace internal | 1365 } // namespace internal |
| 1350 } // namespace v8 | 1366 } // namespace v8 |
| OLD | NEW |