| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 74 // from the calling function.  When this function runs, the stack contains | 74 // from the calling function.  When this function runs, the stack contains | 
| 75 // a C_Entry frame and a Construct frame above the calling function's frame. | 75 // a C_Entry frame and a Construct frame above the calling function's frame. | 
| 76 static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) { | 76 static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) { | 
| 77   i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate()); | 77   i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate()); | 
| 78   i::StackFrameIterator frame_iterator(isolate); | 78   i::StackFrameIterator frame_iterator(isolate); | 
| 79   CHECK(frame_iterator.frame()->is_exit() || | 79   CHECK(frame_iterator.frame()->is_exit() || | 
| 80         frame_iterator.frame()->is_builtin_exit()); | 80         frame_iterator.frame()->is_builtin_exit()); | 
| 81   frame_iterator.Advance(); | 81   frame_iterator.Advance(); | 
| 82   CHECK(frame_iterator.frame()->is_construct()); | 82   CHECK(frame_iterator.frame()->is_construct()); | 
| 83   frame_iterator.Advance(); | 83   frame_iterator.Advance(); | 
| 84   if (frame_iterator.frame()->type() == i::StackFrame::STUB) { | 84   if (i::FLAG_ignition) { | 
| 85     // Skip over bytecode handler frame. | 85     // Skip over bytecode handler frame. | 
|  | 86     CHECK(frame_iterator.frame()->type() == i::StackFrame::STUB); | 
| 86     frame_iterator.Advance(); | 87     frame_iterator.Advance(); | 
| 87   } | 88   } | 
| 88   i::StackFrame* calling_frame = frame_iterator.frame(); | 89   i::StackFrame* calling_frame = frame_iterator.frame(); | 
| 89   CHECK(calling_frame->is_java_script()); | 90   CHECK(calling_frame->is_java_script()); | 
| 90 | 91 | 
| 91   v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext(); | 92   v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext(); | 
| 92 #if defined(V8_HOST_ARCH_32_BIT) | 93 #if defined(V8_HOST_ARCH_32_BIT) | 
| 93   int32_t low_bits = reinterpret_cast<int32_t>(calling_frame->fp()); | 94   int32_t low_bits = reinterpret_cast<int32_t>(calling_frame->fp()); | 
| 94   args.This() | 95   args.This() | 
| 95       ->Set(context, v8_str("low_bits"), v8_num(low_bits >> 1)) | 96       ->Set(context, v8_str("low_bits"), v8_num(low_bits >> 1)) | 
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 288   v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); | 289   v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); | 
| 289   v8::Context::Scope context_scope(context); | 290   v8::Context::Scope context_scope(context); | 
| 290   CHECK(!i::TraceExtension::GetJsEntrySp()); | 291   CHECK(!i::TraceExtension::GetJsEntrySp()); | 
| 291   CompileRun("a = 1; b = a + 1;"); | 292   CompileRun("a = 1; b = a + 1;"); | 
| 292   CHECK(!i::TraceExtension::GetJsEntrySp()); | 293   CHECK(!i::TraceExtension::GetJsEntrySp()); | 
| 293   CompileRun("js_entry_sp();"); | 294   CompileRun("js_entry_sp();"); | 
| 294   CHECK(!i::TraceExtension::GetJsEntrySp()); | 295   CHECK(!i::TraceExtension::GetJsEntrySp()); | 
| 295   CompileRun("js_entry_sp_level2();"); | 296   CompileRun("js_entry_sp_level2();"); | 
| 296   CHECK(!i::TraceExtension::GetJsEntrySp()); | 297   CHECK(!i::TraceExtension::GetJsEntrySp()); | 
| 297 } | 298 } | 
| OLD | NEW | 
|---|