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

Side by Side Diff: src/builtins.h

Issue 52643002: HeapProfiler: provide human readable names for code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: style fix Created 7 years, 1 month 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/heap-snapshot-generator.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 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 Address builtin_address(Name name) { 358 Address builtin_address(Name name) {
359 return reinterpret_cast<Address>(&builtins_[name]); 359 return reinterpret_cast<Address>(&builtins_[name]);
360 } 360 }
361 361
362 static Address c_function_address(CFunctionId id) { 362 static Address c_function_address(CFunctionId id) {
363 return c_functions_[id]; 363 return c_functions_[id];
364 } 364 }
365 365
366 static const char* GetName(JavaScript id) { return javascript_names_[id]; } 366 static const char* GetName(JavaScript id) { return javascript_names_[id]; }
367 const char* name(int index) {
368 ASSERT(index >= 0);
369 ASSERT(index < builtin_count);
370 return names_[index];
371 }
367 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; } 372 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; }
368 Handle<Code> GetCode(JavaScript id, bool* resolved); 373 Handle<Code> GetCode(JavaScript id, bool* resolved);
369 static int NumberOfJavaScriptBuiltins() { return id_count; } 374 static int NumberOfJavaScriptBuiltins() { return id_count; }
370 375
371 bool is_initialized() const { return initialized_; } 376 bool is_initialized() const { return initialized_; }
372 377
373 private: 378 private:
374 Builtins(); 379 Builtins();
375 380
376 // The external C++ functions called from the code. 381 // The external C++ functions called from the code.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 436
432 friend class BuiltinFunctionTable; 437 friend class BuiltinFunctionTable;
433 friend class Isolate; 438 friend class Isolate;
434 439
435 DISALLOW_COPY_AND_ASSIGN(Builtins); 440 DISALLOW_COPY_AND_ASSIGN(Builtins);
436 }; 441 };
437 442
438 } } // namespace v8::internal 443 } } // namespace v8::internal
439 444
440 #endif // V8_BUILTINS_H_ 445 #endif // V8_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698