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

Side by Side Diff: src/runtime.cc

Issue 12095035: %X => %_X, %_X => %__X (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 10 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/parser.cc ('k') | src/x64/full-codegen-x64.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 // 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 13252 matching lines...) Expand 10 before | Expand all | Expand 10 after
13263 Handle<FixedArray> elements = factory->NewFixedArray(entry_count); 13263 Handle<FixedArray> elements = factory->NewFixedArray(entry_count);
13264 int index = 0; 13264 int index = 0;
13265 bool inline_runtime_functions = false; 13265 bool inline_runtime_functions = false;
13266 #define ADD_ENTRY(Name, argc, ressize) \ 13266 #define ADD_ENTRY(Name, argc, ressize) \
13267 { \ 13267 { \
13268 HandleScope inner; \ 13268 HandleScope inner; \
13269 Handle<String> name; \ 13269 Handle<String> name; \
13270 /* Inline runtime functions have an underscore in front of the name. */ \ 13270 /* Inline runtime functions have an underscore in front of the name. */ \
13271 if (inline_runtime_functions) { \ 13271 if (inline_runtime_functions) { \
13272 name = factory->NewStringFromAscii( \ 13272 name = factory->NewStringFromAscii( \
13273 Vector<const char>("_" #Name, StrLength("_" #Name))); \ 13273 Vector<const char>("__" #Name, StrLength("__" #Name))); \
13274 } else { \ 13274 } else { \
13275 name = factory->NewStringFromAscii( \ 13275 name = factory->NewStringFromAscii( \
13276 Vector<const char>(#Name, StrLength(#Name))); \ 13276 Vector<const char>("_" #Name, StrLength("_" #Name))); \
13277 } \ 13277 } \
13278 Handle<FixedArray> pair_elements = factory->NewFixedArray(2); \ 13278 Handle<FixedArray> pair_elements = factory->NewFixedArray(2); \
13279 pair_elements->set(0, *name); \ 13279 pair_elements->set(0, *name); \
13280 pair_elements->set(1, Smi::FromInt(argc)); \ 13280 pair_elements->set(1, Smi::FromInt(argc)); \
13281 Handle<JSArray> pair = factory->NewJSArrayWithElements(pair_elements); \ 13281 Handle<JSArray> pair = factory->NewJSArrayWithElements(pair_elements); \
13282 elements->set(index++, *pair); \ 13282 elements->set(index++, *pair); \
13283 } 13283 }
13284 inline_runtime_functions = false; 13284 inline_runtime_functions = false;
13285 RUNTIME_FUNCTION_LIST(ADD_ENTRY) 13285 RUNTIME_FUNCTION_LIST(ADD_ENTRY)
13286 inline_runtime_functions = true; 13286 inline_runtime_functions = true;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
13435 } 13435 }
13436 Handle<Object> value = args.at<Object>(2); 13436 Handle<Object> value = args.at<Object>(2);
13437 return *PutIntoObjectHashTable(table, key, value); 13437 return *PutIntoObjectHashTable(table, key, value);
13438 } 13438 }
13439 13439
13440 13440
13441 // ---------------------------------------------------------------------------- 13441 // ----------------------------------------------------------------------------
13442 // Implementation of Runtime 13442 // Implementation of Runtime
13443 13443
13444 #define F(name, number_of_args, result_size) \ 13444 #define F(name, number_of_args, result_size) \
13445 { Runtime::k##name, Runtime::RUNTIME, #name, \ 13445 { Runtime::k##name, Runtime::RUNTIME, "_" #name, \
13446 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, 13446 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size },
13447 13447
13448 13448
13449 #define I(name, number_of_args, result_size) \ 13449 #define I(name, number_of_args, result_size) \
13450 { Runtime::kInline##name, Runtime::INLINE, \ 13450 { Runtime::kInline##name, Runtime::INLINE, \
13451 "_" #name, NULL, number_of_args, result_size }, 13451 "__" #name, NULL, number_of_args, result_size },
13452 13452
13453 static const Runtime::Function kIntrinsicFunctions[] = { 13453 static const Runtime::Function kIntrinsicFunctions[] = {
13454 RUNTIME_FUNCTION_LIST(F) 13454 RUNTIME_FUNCTION_LIST(F)
13455 INLINE_FUNCTION_LIST(I) 13455 INLINE_FUNCTION_LIST(I)
13456 INLINE_RUNTIME_FUNCTION_LIST(I) 13456 INLINE_RUNTIME_FUNCTION_LIST(I)
13457 }; 13457 };
13458 13458
13459 13459
13460 MaybeObject* Runtime::InitializeIntrinsicFunctionNames(Heap* heap, 13460 MaybeObject* Runtime::InitializeIntrinsicFunctionNames(Heap* heap,
13461 Object* dictionary) { 13461 Object* dictionary) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
13517 // Handle last resort GC and make sure to allow future allocations 13517 // Handle last resort GC and make sure to allow future allocations
13518 // to grow the heap without causing GCs (if possible). 13518 // to grow the heap without causing GCs (if possible).
13519 isolate->counters()->gc_last_resort_from_js()->Increment(); 13519 isolate->counters()->gc_last_resort_from_js()->Increment();
13520 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13520 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13521 "Runtime::PerformGC"); 13521 "Runtime::PerformGC");
13522 } 13522 }
13523 } 13523 }
13524 13524
13525 13525
13526 } } // namespace v8::internal 13526 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698