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 16 matching lines...) Expand all Loading... | |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_IA32) | 30 #if defined(V8_TARGET_ARCH_IA32) |
31 | 31 |
32 #include "code-stubs.h" | 32 #include "code-stubs.h" |
33 #include "codegen.h" | 33 #include "codegen.h" |
34 #include "compiler.h" | 34 #include "compiler.h" |
35 #include "debug.h" | 35 #include "debug.h" |
36 #include "full-codegen.h" | 36 #include "full-codegen.h" |
37 #include "isolate-inl.h" | |
37 #include "parser.h" | 38 #include "parser.h" |
38 #include "scopes.h" | 39 #include "scopes.h" |
39 #include "stub-cache.h" | 40 #include "stub-cache.h" |
40 | 41 |
41 namespace v8 { | 42 namespace v8 { |
42 namespace internal { | 43 namespace internal { |
43 | 44 |
44 #define __ ACCESS_MASM(masm_) | 45 #define __ ACCESS_MASM(masm_) |
45 | 46 |
46 | 47 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 } | 94 } |
94 | 95 |
95 MacroAssembler* masm_; | 96 MacroAssembler* masm_; |
96 Label patch_site_; | 97 Label patch_site_; |
97 #ifdef DEBUG | 98 #ifdef DEBUG |
98 bool info_emitted_; | 99 bool info_emitted_; |
99 #endif | 100 #endif |
100 }; | 101 }; |
101 | 102 |
102 | 103 |
104 // TODO(jkummerow): Obsolete as soon as x64 is updated. Remove. | |
Erik Corry
2012/03/23 09:55:53
hmmm
Jakob Kummerow
2012/03/23 12:07:32
See my response in full-codegen-arm.cc.
| |
103 int FullCodeGenerator::self_optimization_header_size() { | 105 int FullCodeGenerator::self_optimization_header_size() { |
106 UNREACHABLE(); | |
104 return 13; | 107 return 13; |
105 } | 108 } |
106 | 109 |
107 | 110 |
108 // Generate code for a JS function. On entry to the function the receiver | 111 // Generate code for a JS function. On entry to the function the receiver |
109 // and arguments have been pushed on the stack left to right, with the | 112 // and arguments have been pushed on the stack left to right, with the |
110 // return address on top of them. The actual argument count matches the | 113 // return address on top of them. The actual argument count matches the |
111 // formal parameter count expected by the function. | 114 // formal parameter count expected by the function. |
112 // | 115 // |
113 // The live registers are: | 116 // The live registers are: |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
314 Immediate(Smi::FromInt(delta))); | 317 Immediate(Smi::FromInt(delta))); |
315 } | 318 } |
316 | 319 |
317 | 320 |
318 void FullCodeGenerator::EmitProfilingCounterReset() { | 321 void FullCodeGenerator::EmitProfilingCounterReset() { |
319 int reset_value = FLAG_interrupt_budget; | 322 int reset_value = FLAG_interrupt_budget; |
320 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 323 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
321 // Self-optimization is a one-off thing: if it fails, don't try again. | 324 // Self-optimization is a one-off thing: if it fails, don't try again. |
322 reset_value = Smi::kMaxValue; | 325 reset_value = Smi::kMaxValue; |
323 } | 326 } |
327 if (isolate()->IsDebuggerActive()) { | |
328 reset_value = 10; | |
329 } | |
324 __ mov(ebx, Immediate(profiling_counter_)); | 330 __ mov(ebx, Immediate(profiling_counter_)); |
325 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), | 331 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), |
326 Immediate(Smi::FromInt(reset_value))); | 332 Immediate(Smi::FromInt(reset_value))); |
327 } | 333 } |
328 | 334 |
329 | 335 |
330 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt, | 336 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt, |
331 Label* back_edge_target) { | 337 Label* back_edge_target) { |
332 Comment cmnt(masm_, "[ Stack check"); | 338 Comment cmnt(masm_, "[ Stack check"); |
333 Label ok; | 339 Label ok; |
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4496 *context_length = 0; | 4502 *context_length = 0; |
4497 return previous_; | 4503 return previous_; |
4498 } | 4504 } |
4499 | 4505 |
4500 | 4506 |
4501 #undef __ | 4507 #undef __ |
4502 | 4508 |
4503 } } // namespace v8::internal | 4509 } } // namespace v8::internal |
4504 | 4510 |
4505 #endif // V8_TARGET_ARCH_IA32 | 4511 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |