OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 Comment cmnt(masm, "[ ExitNode"); | 105 Comment cmnt(masm, "[ ExitNode"); |
106 if (FLAG_trace) { | 106 if (FLAG_trace) { |
107 __ push(rax); | 107 __ push(rax); |
108 __ CallRuntime(Runtime::kTraceExit, 1); | 108 __ CallRuntime(Runtime::kTraceExit, 1); |
109 } | 109 } |
110 __ RecordJSReturn(); | 110 __ RecordJSReturn(); |
111 __ movq(rsp, rbp); | 111 __ movq(rsp, rbp); |
112 __ pop(rbp); | 112 __ pop(rbp); |
113 int count = CfgGlobals::current()->fun()->scope()->num_parameters(); | 113 int count = CfgGlobals::current()->fun()->scope()->num_parameters(); |
114 __ ret((count + 1) * kPointerSize); | 114 __ ret((count + 1) * kPointerSize); |
| 115 #ifdef ENABLE_DEBUGGER_SUPPORT |
115 // Add padding that will be overwritten by a debugger breakpoint. | 116 // Add padding that will be overwritten by a debugger breakpoint. |
116 // "movq rsp, rbp; pop rbp" has length 4. "ret k" has length 3. | 117 // "movq rsp, rbp; pop rbp" has length 4. "ret k" has length 3. |
117 const int kPadding = Debug::kX64JSReturnSequenceLength - 4 - 3; | 118 const int kPadding = Debug::kX64JSReturnSequenceLength - 4 - 3; |
118 for (int i = 0; i < kPadding; ++i) { | 119 for (int i = 0; i < kPadding; ++i) { |
119 __ int3(); | 120 __ int3(); |
120 } | 121 } |
| 122 #endif |
121 } | 123 } |
122 | 124 |
123 | 125 |
124 void PropLoadInstr::Compile(MacroAssembler* masm) { | 126 void PropLoadInstr::Compile(MacroAssembler* masm) { |
125 // The key should not be on the stack---if it is a compiler-generated | 127 // The key should not be on the stack---if it is a compiler-generated |
126 // temporary it is in the accumulator. | 128 // temporary it is in the accumulator. |
127 ASSERT(!key()->is_on_stack()); | 129 ASSERT(!key()->is_on_stack()); |
128 | 130 |
129 Comment cmnt(masm, "[ Load from Property"); | 131 Comment cmnt(masm, "[ Load from Property"); |
130 // If the key is known at compile-time we may be able to use a load IC. | 132 // If the key is known at compile-time we may be able to use a load IC. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 break; | 315 break; |
314 case NOT_ALLOCATED: | 316 case NOT_ALLOCATED: |
315 UNREACHABLE(); | 317 UNREACHABLE(); |
316 } | 318 } |
317 } | 319 } |
318 | 320 |
319 | 321 |
320 #undef __ | 322 #undef __ |
321 | 323 |
322 } } // namespace v8::internal | 324 } } // namespace v8::internal |
OLD | NEW |