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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 | 230 |
231 inline int JavaScriptFrame::ComputeOperandsCount() const { | 231 inline int JavaScriptFrame::ComputeOperandsCount() const { |
232 Address base = fp() + JavaScriptFrameConstants::kLocal0Offset; | 232 Address base = fp() + JavaScriptFrameConstants::kLocal0Offset; |
233 // Base points to low address of first operand and stack grows down, so add | 233 // Base points to low address of first operand and stack grows down, so add |
234 // kPointerSize to get the actual stack size. | 234 // kPointerSize to get the actual stack size. |
235 intptr_t stack_size_in_bytes = (base + kPointerSize) - sp(); | 235 intptr_t stack_size_in_bytes = (base + kPointerSize) - sp(); |
236 ASSERT(IsAligned(stack_size_in_bytes, kPointerSize)); | 236 ASSERT(IsAligned(stack_size_in_bytes, kPointerSize)); |
237 ASSERT(type() == JAVA_SCRIPT); | 237 ASSERT(type() == JAVA_SCRIPT); |
238 ASSERT(stack_size_in_bytes >= 0); | 238 ASSERT(stack_size_in_bytes >= 0); |
239 return stack_size_in_bytes >> kPointerSizeLog2; | 239 return static_cast<int>(stack_size_in_bytes >> kPointerSizeLog2); |
240 } | 240 } |
241 | 241 |
242 | 242 |
243 inline Object* JavaScriptFrame::receiver() const { | 243 inline Object* JavaScriptFrame::receiver() const { |
244 return GetParameter(-1); | 244 return GetParameter(-1); |
245 } | 245 } |
246 | 246 |
247 | 247 |
248 inline void JavaScriptFrame::set_receiver(Object* value) { | 248 inline void JavaScriptFrame::set_receiver(Object* value) { |
249 Memory::Object_at(GetParameterSlot(-1)) = value; | 249 Memory::Object_at(GetParameterSlot(-1)) = value; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 template<typename Iterator> | 356 template<typename Iterator> |
357 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { | 357 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { |
358 iterator_.Reset(); | 358 iterator_.Reset(); |
359 if (!done()) Advance(); | 359 if (!done()) Advance(); |
360 } | 360 } |
361 | 361 |
362 | 362 |
363 } } // namespace v8::internal | 363 } } // namespace v8::internal |
364 | 364 |
365 #endif // V8_FRAMES_INL_H_ | 365 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |