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

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

Issue 7860011: Rename SmartPointer to SmartArrayPointer. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: rebase it again to get more fixes Created 9 years, 3 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
« no previous file with comments | « src/flags.cc ('k') | src/hydrogen.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 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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 ASSERT(state < STACK_STATE_MAX); 986 ASSERT(state < STACK_STATE_MAX);
987 return stack_state_start_addresses_[state]; 987 return stack_state_start_addresses_[state];
988 } 988 }
989 989
990 void SetStackStateStartAddress(StackState state, uintptr_t addr) { 990 void SetStackStateStartAddress(StackState state, uintptr_t addr) {
991 ASSERT(state < STACK_STATE_MAX); 991 ASSERT(state < STACK_STATE_MAX);
992 stack_state_start_addresses_[state] = addr; 992 stack_state_start_addresses_[state] = addr;
993 } 993 }
994 #endif 994 #endif
995 995
996 SmartPointer<char> GetFilename() { 996 SmartArrayPointer<char> GetFilename() {
997 return String::cast(script_->name())->ToCString(); 997 return String::cast(script_->name())->ToCString();
998 } 998 }
999 999
1000 int GetScriptLineNumber(int pos) { 1000 int GetScriptLineNumber(int pos) {
1001 return GetScriptLineNumberSafe(script_, pos) + 1; 1001 return GetScriptLineNumberSafe(script_, pos) + 1;
1002 } 1002 }
1003 1003
1004 1004
1005 private: 1005 private:
1006 const char* name_; 1006 const char* name_;
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 void GDBJITInterface::AddCode(Handle<String> name, 1984 void GDBJITInterface::AddCode(Handle<String> name,
1985 Handle<Script> script, 1985 Handle<Script> script,
1986 Handle<Code> code, 1986 Handle<Code> code,
1987 CompilationInfo* info) { 1987 CompilationInfo* info) {
1988 if (!FLAG_gdbjit) return; 1988 if (!FLAG_gdbjit) return;
1989 1989
1990 // Force initialization of line_ends array. 1990 // Force initialization of line_ends array.
1991 GetScriptLineNumber(script, 0); 1991 GetScriptLineNumber(script, 0);
1992 1992
1993 if (!name.is_null()) { 1993 if (!name.is_null()) {
1994 SmartPointer<char> name_cstring = name->ToCString(DISALLOW_NULLS); 1994 SmartArrayPointer<char> name_cstring = name->ToCString(DISALLOW_NULLS);
1995 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info); 1995 AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script, info);
1996 } else { 1996 } else {
1997 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info); 1997 AddCode("", *code, GDBJITInterface::FUNCTION, *script, info);
1998 } 1998 }
1999 } 1999 }
2000 2000
2001 static void AddUnwindInfo(CodeDescription *desc) { 2001 static void AddUnwindInfo(CodeDescription *desc) {
2002 #ifdef V8_TARGET_ARCH_X64 2002 #ifdef V8_TARGET_ARCH_X64
2003 if (desc->tag() == GDBJITInterface::FUNCTION) { 2003 if (desc->tag() == GDBJITInterface::FUNCTION) {
2004 // To avoid propagating unwinding information through 2004 // To avoid propagating unwinding information through
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 ScopedLock lock(mutex_); 2149 ScopedLock lock(mutex_);
2150 ASSERT(!IsLineInfoTagged(line_info)); 2150 ASSERT(!IsLineInfoTagged(line_info));
2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true); 2151 HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
2152 ASSERT(e->value == NULL); 2152 ASSERT(e->value == NULL);
2153 e->value = TagLineInfo(line_info); 2153 e->value = TagLineInfo(line_info);
2154 } 2154 }
2155 2155
2156 2156
2157 } } // namespace v8::internal 2157 } } // namespace v8::internal
2158 #endif 2158 #endif
OLDNEW
« no previous file with comments | « src/flags.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698