| OLD | NEW |
| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 void FullCodeGenerator::EmitProfilingCounterReset() { | 313 void FullCodeGenerator::EmitProfilingCounterReset() { |
| 314 int reset_value = FLAG_interrupt_budget; | 314 int reset_value = FLAG_interrupt_budget; |
| 315 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 315 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
| 316 // Self-optimization is a one-off thing; if it fails, don't try again. | 316 // Self-optimization is a one-off thing; if it fails, don't try again. |
| 317 reset_value = Smi::kMaxValue; | 317 reset_value = Smi::kMaxValue; |
| 318 } | 318 } |
| 319 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); | 319 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); |
| 320 __ movq(kScratchRegister, | 320 __ movq(kScratchRegister, |
| 321 reinterpret_cast<uint64_t>(Smi::FromInt(reset_value)), | 321 reinterpret_cast<uint64_t>(Smi::FromInt(reset_value)), |
| 322 RelocInfo::NONE); | 322 RelocInfo::NONE64); |
| 323 __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), | 323 __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), |
| 324 kScratchRegister); | 324 kScratchRegister); |
| 325 } | 325 } |
| 326 | 326 |
| 327 | 327 |
| 328 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, | 328 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, |
| 329 Label* back_edge_target) { | 329 Label* back_edge_target) { |
| 330 Comment cmnt(masm_, "[ Back edge bookkeeping"); | 330 Comment cmnt(masm_, "[ Back edge bookkeeping"); |
| 331 Label ok; | 331 Label ok; |
| 332 | 332 |
| (...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3014 __ cmpq(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); | 3014 __ cmpq(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); |
| 3015 __ j(not_equal, &runtime, Label::kNear); | 3015 __ j(not_equal, &runtime, Label::kNear); |
| 3016 __ movq(result, FieldOperand(object, JSDate::kValueOffset + | 3016 __ movq(result, FieldOperand(object, JSDate::kValueOffset + |
| 3017 kPointerSize * index->value())); | 3017 kPointerSize * index->value())); |
| 3018 __ jmp(&done); | 3018 __ jmp(&done); |
| 3019 } | 3019 } |
| 3020 __ bind(&runtime); | 3020 __ bind(&runtime); |
| 3021 __ PrepareCallCFunction(2); | 3021 __ PrepareCallCFunction(2); |
| 3022 #ifdef _WIN64 | 3022 #ifdef _WIN64 |
| 3023 __ movq(rcx, object); | 3023 __ movq(rcx, object); |
| 3024 __ movq(rdx, index, RelocInfo::NONE); | 3024 __ movq(rdx, index, RelocInfo::NONE64); |
| 3025 #else | 3025 #else |
| 3026 __ movq(rdi, object); | 3026 __ movq(rdi, object); |
| 3027 __ movq(rsi, index, RelocInfo::NONE); | 3027 __ movq(rsi, index, RelocInfo::NONE64); |
| 3028 #endif | 3028 #endif |
| 3029 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); | 3029 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); |
| 3030 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 3030 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 3031 __ jmp(&done); | 3031 __ jmp(&done); |
| 3032 } | 3032 } |
| 3033 | 3033 |
| 3034 __ bind(¬_date_object); | 3034 __ bind(¬_date_object); |
| 3035 __ CallRuntime(Runtime::kThrowNotDateError, 0); | 3035 __ CallRuntime(Runtime::kThrowNotDateError, 0); |
| 3036 __ bind(&done); | 3036 __ bind(&done); |
| 3037 context()->Plug(rax); | 3037 context()->Plug(rax); |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4518 *context_length = 0; | 4518 *context_length = 0; |
| 4519 return previous_; | 4519 return previous_; |
| 4520 } | 4520 } |
| 4521 | 4521 |
| 4522 | 4522 |
| 4523 #undef __ | 4523 #undef __ |
| 4524 | 4524 |
| 4525 } } // namespace v8::internal | 4525 } } // namespace v8::internal |
| 4526 | 4526 |
| 4527 #endif // V8_TARGET_ARCH_X64 | 4527 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |