Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/debug.cc

Issue 407383004: Do not reverse lookup code stubs dictionary. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/disassembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 if (is_at_restarted_function) { 1482 if (is_at_restarted_function) {
1483 Handle<JSFunction> restarted_function( 1483 Handle<JSFunction> restarted_function(
1484 JSFunction::cast(*thread_local_.restarter_frame_function_pointer_)); 1484 JSFunction::cast(*thread_local_.restarter_frame_function_pointer_));
1485 FloodWithOneShot(restarted_function); 1485 FloodWithOneShot(restarted_function);
1486 } else if (!call_function_stub.is_null()) { 1486 } else if (!call_function_stub.is_null()) {
1487 // If it's CallFunction stub ensure target function is compiled and flood 1487 // If it's CallFunction stub ensure target function is compiled and flood
1488 // it with one shot breakpoints. 1488 // it with one shot breakpoints.
1489 bool is_call_ic = call_function_stub->kind() == Code::CALL_IC; 1489 bool is_call_ic = call_function_stub->kind() == Code::CALL_IC;
1490 1490
1491 // Find out number of arguments from the stub minor key. 1491 // Find out number of arguments from the stub minor key.
1492 // Reverse lookup required as the minor key cannot be retrieved 1492 uint32_t key = call_function_stub->stub_key();
1493 // from the code object.
1494 Handle<Object> obj(
1495 isolate_->heap()->code_stubs()->SlowReverseLookup(
1496 *call_function_stub),
1497 isolate_);
1498 ASSERT(!obj.is_null());
1499 ASSERT(!(*obj)->IsUndefined());
1500 ASSERT(obj->IsSmi());
1501 // Get the STUB key and extract major and minor key.
1502 uint32_t key = Smi::cast(*obj)->value();
1503 // Argc in the stub is the number of arguments passed - not the 1493 // Argc in the stub is the number of arguments passed - not the
1504 // expected arguments of the called function. 1494 // expected arguments of the called function.
1505 int call_function_arg_count = is_call_ic 1495 int call_function_arg_count = is_call_ic
1506 ? CallICStub::ExtractArgcFromMinorKey(CodeStub::MinorKeyFromKey(key)) 1496 ? CallICStub::ExtractArgcFromMinorKey(CodeStub::MinorKeyFromKey(key))
1507 : CallFunctionStub::ExtractArgcFromMinorKey( 1497 : CallFunctionStub::ExtractArgcFromMinorKey(
1508 CodeStub::MinorKeyFromKey(key)); 1498 CodeStub::MinorKeyFromKey(key));
1509 1499
1510 ASSERT(is_call_ic || 1500 ASSERT(is_call_ic ||
1511 CodeStub::GetMajorKey(*call_function_stub) == 1501 CodeStub::GetMajorKey(*call_function_stub) ==
1512 CodeStub::MajorKeyFromKey(key)); 1502 CodeStub::MajorKeyFromKey(key));
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 logger_->DebugEvent("Put", message.text()); 3397 logger_->DebugEvent("Put", message.text());
3408 } 3398 }
3409 3399
3410 3400
3411 void LockingCommandMessageQueue::Clear() { 3401 void LockingCommandMessageQueue::Clear() {
3412 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3402 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3413 queue_.Clear(); 3403 queue_.Clear();
3414 } 3404 }
3415 3405
3416 } } // namespace v8::internal 3406 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698