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

Side by Side Diff: src/gdb-jit.cc

Issue 239543010: Revert "Move functions from handles.cc to where they belong." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « src/frames.cc ('k') | src/handles.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 ASSERT(state < STACK_STATE_MAX); 995 ASSERT(state < STACK_STATE_MAX);
996 stack_state_start_addresses_[state] = addr; 996 stack_state_start_addresses_[state] = addr;
997 } 997 }
998 #endif 998 #endif
999 999
1000 SmartArrayPointer<char> GetFilename() { 1000 SmartArrayPointer<char> GetFilename() {
1001 return String::cast(script_->name())->ToCString(); 1001 return String::cast(script_->name())->ToCString();
1002 } 1002 }
1003 1003
1004 int GetScriptLineNumber(int pos) { 1004 int GetScriptLineNumber(int pos) {
1005 return script_->GetLineNumber(pos) + 1; 1005 return GetScriptLineNumberSafe(script_, pos) + 1;
1006 } 1006 }
1007 1007
1008 1008
1009 private: 1009 private:
1010 const char* name_; 1010 const char* name_;
1011 Code* code_; 1011 Code* code_;
1012 Handle<Script> script_; 1012 Handle<Script> script_;
1013 GDBJITLineInfo* lineinfo_; 1013 GDBJITLineInfo* lineinfo_;
1014 GDBJITInterface::CodeTag tag_; 1014 GDBJITInterface::CodeTag tag_;
1015 CompilationInfo* info_; 1015 CompilationInfo* info_;
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 reinterpret_cast<intptr_t>(ptr) & ~kLineInfoTag); 1996 reinterpret_cast<intptr_t>(ptr) & ~kLineInfoTag);
1997 } 1997 }
1998 1998
1999 1999
2000 void GDBJITInterface::AddCode(Handle<Name> name, 2000 void GDBJITInterface::AddCode(Handle<Name> name,
2001 Handle<Script> script, 2001 Handle<Script> script,
2002 Handle<Code> code, 2002 Handle<Code> code,
2003 CompilationInfo* info) { 2003 CompilationInfo* info) {
2004 if (!FLAG_gdbjit) return; 2004 if (!FLAG_gdbjit) return;
2005 2005
2006 Script::InitLineEnds(script); 2006 // Force initialization of line_ends array.
2007 GetScriptLineNumber(script, 0);
2007 2008
2008 if (!name.is_null() && name->IsString()) { 2009 if (!name.is_null() && name->IsString()) {
2009 SmartArrayPointer<char> name_cstring = 2010 SmartArrayPointer<char> name_cstring =
2010 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS); 2011 Handle<String>::cast(name)->ToCString(DISALLOW_NULLS);
2011 AddCode(name_cstring.get(), *code, GDBJITInterface::FUNCTION, *script, 2012 AddCode(name_cstring.get(), *code, GDBJITInterface::FUNCTION, *script,
2012 info); 2013 info);
2013 } else { 2014 } else {
2014 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); 2015 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info);
2015 } 2016 }
2016 } 2017 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 LockGuard<Mutex> lock_guard(mutex.Pointer()); 2191 LockGuard<Mutex> lock_guard(mutex.Pointer());
2191 ASSERT(!IsLineInfoTagged(line_info)); 2192 ASSERT(!IsLineInfoTagged(line_info));
2192 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); 2193 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
2193 ASSERT(e->value == NULL); 2194 ASSERT(e->value == NULL);
2194 e->value = TagLineInfo(line_info); 2195 e->value = TagLineInfo(line_info);
2195 } 2196 }
2196 2197
2197 2198
2198 } } // namespace v8::internal 2199 } } // namespace v8::internal
2199 #endif 2200 #endif
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698