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 256293002: More runtime hardening (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | no next file » | 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 JSObject::SetLocalPropertyIgnoreAttributes( 2761 JSObject::SetLocalPropertyIgnoreAttributes(
2762 regexp, factory->last_index_string(), zero, writable).Check(); 2762 regexp, factory->last_index_string(), zero, writable).Check();
2763 return *regexp; 2763 return *regexp;
2764 } 2764 }
2765 2765
2766 2766
2767 RUNTIME_FUNCTION(Runtime_FinishArrayPrototypeSetup) { 2767 RUNTIME_FUNCTION(Runtime_FinishArrayPrototypeSetup) {
2768 HandleScope scope(isolate); 2768 HandleScope scope(isolate);
2769 ASSERT(args.length() == 1); 2769 ASSERT(args.length() == 1);
2770 CONVERT_ARG_HANDLE_CHECKED(JSArray, prototype, 0); 2770 CONVERT_ARG_HANDLE_CHECKED(JSArray, prototype, 0);
2771 Object* length = prototype->length();
2772 RUNTIME_ASSERT(length->IsSmi() && Smi::cast(length)->value() == 0);
2773 RUNTIME_ASSERT(prototype->HasFastSmiOrObjectElements());
2771 // This is necessary to enable fast checks for absence of elements 2774 // This is necessary to enable fast checks for absence of elements
2772 // on Array.prototype and below. 2775 // on Array.prototype and below.
2773 prototype->set_elements(isolate->heap()->empty_fixed_array()); 2776 prototype->set_elements(isolate->heap()->empty_fixed_array());
2774 return Smi::FromInt(0); 2777 return Smi::FromInt(0);
2775 } 2778 }
2776 2779
2777 2780
2778 static Handle<JSFunction> InstallBuiltin(Isolate* isolate, 2781 static Handle<JSFunction> InstallBuiltin(Isolate* isolate,
2779 Handle<JSObject> holder, 2782 Handle<JSObject> holder,
2780 const char* name, 2783 const char* name,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 3087
3085 RUNTIME_FUNCTION(Runtime_SetCode) { 3088 RUNTIME_FUNCTION(Runtime_SetCode) {
3086 HandleScope scope(isolate); 3089 HandleScope scope(isolate);
3087 ASSERT(args.length() == 2); 3090 ASSERT(args.length() == 2);
3088 3091
3089 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); 3092 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
3090 CONVERT_ARG_HANDLE_CHECKED(JSFunction, source, 1); 3093 CONVERT_ARG_HANDLE_CHECKED(JSFunction, source, 1);
3091 3094
3092 Handle<SharedFunctionInfo> target_shared(target->shared()); 3095 Handle<SharedFunctionInfo> target_shared(target->shared());
3093 Handle<SharedFunctionInfo> source_shared(source->shared()); 3096 Handle<SharedFunctionInfo> source_shared(source->shared());
3097 RUNTIME_ASSERT(!source_shared->bound());
3094 3098
3095 if (!Compiler::EnsureCompiled(source, KEEP_EXCEPTION)) { 3099 if (!Compiler::EnsureCompiled(source, KEEP_EXCEPTION)) {
3096 return isolate->heap()->exception(); 3100 return isolate->heap()->exception();
3097 } 3101 }
3098 3102
3099 // Mark both, the source and the target, as un-flushable because the 3103 // Mark both, the source and the target, as un-flushable because the
3100 // shared unoptimized code makes them impossible to enqueue in a list. 3104 // shared unoptimized code makes them impossible to enqueue in a list.
3101 ASSERT(target_shared->code()->gc_metadata() == NULL); 3105 ASSERT(target_shared->code()->gc_metadata() == NULL);
3102 ASSERT(source_shared->code()->gc_metadata() == NULL); 3106 ASSERT(source_shared->code()->gc_metadata() == NULL);
3103 target_shared->set_dont_flush(true); 3107 target_shared->set_dont_flush(true);
(...skipping 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after
6319 } 6323 }
6320 return *result; 6324 return *result;
6321 } 6325 }
6322 6326
6323 6327
6324 RUNTIME_FUNCTION(Runtime_TruncateString) { 6328 RUNTIME_FUNCTION(Runtime_TruncateString) {
6325 HandleScope scope(isolate); 6329 HandleScope scope(isolate);
6326 ASSERT(args.length() == 2); 6330 ASSERT(args.length() == 2);
6327 CONVERT_ARG_HANDLE_CHECKED(SeqString, string, 0); 6331 CONVERT_ARG_HANDLE_CHECKED(SeqString, string, 0);
6328 CONVERT_SMI_ARG_CHECKED(new_length, 1); 6332 CONVERT_SMI_ARG_CHECKED(new_length, 1);
6333 RUNTIME_ASSERT(new_length >= 0);
6329 return *SeqString::Truncate(string, new_length); 6334 return *SeqString::Truncate(string, new_length);
6330 } 6335 }
6331 6336
6332 6337
6333 RUNTIME_FUNCTION(Runtime_URIEscape) { 6338 RUNTIME_FUNCTION(Runtime_URIEscape) {
6334 HandleScope scope(isolate); 6339 HandleScope scope(isolate);
6335 ASSERT(args.length() == 1); 6340 ASSERT(args.length() == 1);
6336 CONVERT_ARG_HANDLE_CHECKED(String, source, 0); 6341 CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
6337 Handle<String> string = String::Flatten(source); 6342 Handle<String> string = String::Flatten(source);
6338 ASSERT(string->IsFlat()); 6343 ASSERT(string->IsFlat());
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
6764 return *isolate->factory()->NewSubString(string, left, right); 6769 return *isolate->factory()->NewSubString(string, left, right);
6765 } 6770 }
6766 6771
6767 6772
6768 RUNTIME_FUNCTION(Runtime_StringSplit) { 6773 RUNTIME_FUNCTION(Runtime_StringSplit) {
6769 HandleScope handle_scope(isolate); 6774 HandleScope handle_scope(isolate);
6770 ASSERT(args.length() == 3); 6775 ASSERT(args.length() == 3);
6771 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); 6776 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0);
6772 CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1); 6777 CONVERT_ARG_HANDLE_CHECKED(String, pattern, 1);
6773 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[2]); 6778 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[2]);
6779 RUNTIME_ASSERT(limit > 0);
6774 6780
6775 int subject_length = subject->length(); 6781 int subject_length = subject->length();
6776 int pattern_length = pattern->length(); 6782 int pattern_length = pattern->length();
6777 RUNTIME_ASSERT(pattern_length > 0); 6783 RUNTIME_ASSERT(pattern_length > 0);
6778 6784
6779 if (limit == 0xffffffffu) { 6785 if (limit == 0xffffffffu) {
6780 Handle<Object> cached_answer( 6786 Handle<Object> cached_answer(
6781 RegExpResultsCache::Lookup(isolate->heap(), 6787 RegExpResultsCache::Lookup(isolate->heap(),
6782 *subject, 6788 *subject,
6783 *pattern, 6789 *pattern,
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
7197 if (pos > special_length || len > special_length - pos) return -1; 7203 if (pos > special_length || len > special_length - pos) return -1;
7198 increment = len; 7204 increment = len;
7199 } else if (elt->IsString()) { 7205 } else if (elt->IsString()) {
7200 String* element = String::cast(elt); 7206 String* element = String::cast(elt);
7201 int element_length = element->length(); 7207 int element_length = element->length();
7202 increment = element_length; 7208 increment = element_length;
7203 if (*one_byte && !element->HasOnlyOneByteChars()) { 7209 if (*one_byte && !element->HasOnlyOneByteChars()) {
7204 *one_byte = false; 7210 *one_byte = false;
7205 } 7211 }
7206 } else { 7212 } else {
7207 ASSERT(!elt->IsTheHole());
7208 return -1; 7213 return -1;
7209 } 7214 }
7210 if (increment > String::kMaxLength - position) { 7215 if (increment > String::kMaxLength - position) {
7211 return kMaxInt; // Provoke throw on allocation. 7216 return kMaxInt; // Provoke throw on allocation.
7212 } 7217 }
7213 position += increment; 7218 position += increment;
7214 } 7219 }
7215 return position; 7220 return position;
7216 } 7221 }
7217 7222
7218 7223
7219 RUNTIME_FUNCTION(Runtime_StringBuilderConcat) { 7224 RUNTIME_FUNCTION(Runtime_StringBuilderConcat) {
7220 HandleScope scope(isolate); 7225 HandleScope scope(isolate);
7221 ASSERT(args.length() == 3); 7226 ASSERT(args.length() == 3);
7222 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0); 7227 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
7223 if (!args[1]->IsSmi()) return isolate->ThrowInvalidStringLength(); 7228 if (!args[1]->IsSmi()) return isolate->ThrowInvalidStringLength();
7224 CONVERT_SMI_ARG_CHECKED(array_length, 1); 7229 CONVERT_SMI_ARG_CHECKED(array_length, 1);
7225 CONVERT_ARG_HANDLE_CHECKED(String, special, 2); 7230 CONVERT_ARG_HANDLE_CHECKED(String, special, 2);
7226 7231
7227 size_t actual_array_length = 0; 7232 size_t actual_array_length = 0;
7228 RUNTIME_ASSERT( 7233 RUNTIME_ASSERT(
7229 TryNumberToSize(isolate, array->length(), &actual_array_length)); 7234 TryNumberToSize(isolate, array->length(), &actual_array_length));
7230 RUNTIME_ASSERT(array_length >= 0); 7235 RUNTIME_ASSERT(array_length >= 0);
7231 RUNTIME_ASSERT(static_cast<size_t>(array_length) <= actual_array_length); 7236 RUNTIME_ASSERT(static_cast<size_t>(array_length) <= actual_array_length);
7232 7237
7233 // This assumption is used by the slice encoding in one or two smis. 7238 // This assumption is used by the slice encoding in one or two smis.
7234 ASSERT(Smi::kMaxValue >= String::kMaxLength); 7239 ASSERT(Smi::kMaxValue >= String::kMaxLength);
7235 7240
7241 RUNTIME_ASSERT(array->HasFastElements());
7236 JSObject::EnsureCanContainHeapObjectElements(array); 7242 JSObject::EnsureCanContainHeapObjectElements(array);
7237 7243
7238 int special_length = special->length(); 7244 int special_length = special->length();
7239 if (!array->HasFastObjectElements()) { 7245 if (!array->HasFastObjectElements()) {
7240 return isolate->Throw(isolate->heap()->illegal_argument_string()); 7246 return isolate->Throw(isolate->heap()->illegal_argument_string());
7241 } 7247 }
7242 7248
7243 int length; 7249 int length;
7244 bool one_byte = special->HasOnlyOneByteChars(); 7250 bool one_byte = special->HasOnlyOneByteChars();
7245 7251
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
8195 Handle<Object> bindee = args.at<Object>(1); 8201 Handle<Object> bindee = args.at<Object>(1);
8196 8202
8197 // TODO(lrn): Create bound function in C++ code from premade shared info. 8203 // TODO(lrn): Create bound function in C++ code from premade shared info.
8198 bound_function->shared()->set_bound(true); 8204 bound_function->shared()->set_bound(true);
8199 // Get all arguments of calling function (Function.prototype.bind). 8205 // Get all arguments of calling function (Function.prototype.bind).
8200 int argc = 0; 8206 int argc = 0;
8201 SmartArrayPointer<Handle<Object> > arguments = 8207 SmartArrayPointer<Handle<Object> > arguments =
8202 GetCallerArguments(isolate, 0, &argc); 8208 GetCallerArguments(isolate, 0, &argc);
8203 // Don't count the this-arg. 8209 // Don't count the this-arg.
8204 if (argc > 0) { 8210 if (argc > 0) {
8205 ASSERT(*arguments[0] == args[2]); 8211 RUNTIME_ASSERT(*arguments[0] == args[2]);
8206 argc--; 8212 argc--;
8207 } else { 8213 } else {
8208 ASSERT(args[2]->IsUndefined()); 8214 RUNTIME_ASSERT(args[2]->IsUndefined());
8209 } 8215 }
8210 // Initialize array of bindings (function, this, and any existing arguments 8216 // Initialize array of bindings (function, this, and any existing arguments
8211 // if the function was already bound). 8217 // if the function was already bound).
8212 Handle<FixedArray> new_bindings; 8218 Handle<FixedArray> new_bindings;
8213 int i; 8219 int i;
8214 if (bindee->IsJSFunction() && JSFunction::cast(*bindee)->shared()->bound()) { 8220 if (bindee->IsJSFunction() && JSFunction::cast(*bindee)->shared()->bound()) {
8215 Handle<FixedArray> old_bindings( 8221 Handle<FixedArray> old_bindings(
8216 JSFunction::cast(*bindee)->function_bindings()); 8222 JSFunction::cast(*bindee)->function_bindings());
8223 RUNTIME_ASSERT(old_bindings->length() > JSFunction::kBoundFunctionIndex);
8217 new_bindings = 8224 new_bindings =
8218 isolate->factory()->NewFixedArray(old_bindings->length() + argc); 8225 isolate->factory()->NewFixedArray(old_bindings->length() + argc);
8219 bindee = Handle<Object>(old_bindings->get(JSFunction::kBoundFunctionIndex), 8226 bindee = Handle<Object>(old_bindings->get(JSFunction::kBoundFunctionIndex),
8220 isolate); 8227 isolate);
8221 i = 0; 8228 i = 0;
8222 for (int n = old_bindings->length(); i < n; i++) { 8229 for (int n = old_bindings->length(); i < n; i++) {
8223 new_bindings->set(i, old_bindings->get(i)); 8230 new_bindings->set(i, old_bindings->get(i));
8224 } 8231 }
8225 } else { 8232 } else {
8226 int array_size = JSFunction::kBoundArgumentsStartIndex + argc; 8233 int array_size = JSFunction::kBoundArgumentsStartIndex + argc;
(...skipping 22 matching lines...) Expand all
8249 8256
8250 8257
8251 RUNTIME_FUNCTION(Runtime_BoundFunctionGetBindings) { 8258 RUNTIME_FUNCTION(Runtime_BoundFunctionGetBindings) {
8252 HandleScope handles(isolate); 8259 HandleScope handles(isolate);
8253 ASSERT(args.length() == 1); 8260 ASSERT(args.length() == 1);
8254 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, callable, 0); 8261 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, callable, 0);
8255 if (callable->IsJSFunction()) { 8262 if (callable->IsJSFunction()) {
8256 Handle<JSFunction> function = Handle<JSFunction>::cast(callable); 8263 Handle<JSFunction> function = Handle<JSFunction>::cast(callable);
8257 if (function->shared()->bound()) { 8264 if (function->shared()->bound()) {
8258 Handle<FixedArray> bindings(function->function_bindings()); 8265 Handle<FixedArray> bindings(function->function_bindings());
8259 ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map()); 8266 RUNTIME_ASSERT(bindings->map() == isolate->heap()->fixed_cow_array_map());
8260 return *isolate->factory()->NewJSArrayWithElements(bindings); 8267 return *isolate->factory()->NewJSArrayWithElements(bindings);
8261 } 8268 }
8262 } 8269 }
8263 return isolate->heap()->undefined_value(); 8270 return isolate->heap()->undefined_value();
8264 } 8271 }
8265 8272
8266 8273
8267 RUNTIME_FUNCTION(Runtime_NewObjectFromBound) { 8274 RUNTIME_FUNCTION(Runtime_NewObjectFromBound) {
8268 HandleScope scope(isolate); 8275 HandleScope scope(isolate);
8269 ASSERT(args.length() == 1); 8276 ASSERT(args.length() == 1);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
8610 #if defined(USE_SIMULATOR) 8617 #if defined(USE_SIMULATOR)
8611 return isolate->heap()->true_value(); 8618 return isolate->heap()->true_value();
8612 #else 8619 #else
8613 return isolate->heap()->false_value(); 8620 return isolate->heap()->false_value();
8614 #endif 8621 #endif
8615 } 8622 }
8616 8623
8617 8624
8618 RUNTIME_FUNCTION(Runtime_IsConcurrentRecompilationSupported) { 8625 RUNTIME_FUNCTION(Runtime_IsConcurrentRecompilationSupported) {
8619 SealHandleScope shs(isolate); 8626 SealHandleScope shs(isolate);
8627 ASSERT(args.length() == 0);
8620 return isolate->heap()->ToBoolean( 8628 return isolate->heap()->ToBoolean(
8621 isolate->concurrent_recompilation_enabled()); 8629 isolate->concurrent_recompilation_enabled());
8622 } 8630 }
8623 8631
8624 8632
8625 RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) { 8633 RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
8626 HandleScope scope(isolate); 8634 HandleScope scope(isolate);
8627 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2); 8635 RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
8628 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 8636 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8629 8637
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
9655 return *isolate->factory()->NewNumber(millis); 9663 return *isolate->factory()->NewNumber(millis);
9656 } 9664 }
9657 9665
9658 9666
9659 RUNTIME_FUNCTION(Runtime_DateParseString) { 9667 RUNTIME_FUNCTION(Runtime_DateParseString) {
9660 HandleScope scope(isolate); 9668 HandleScope scope(isolate);
9661 ASSERT(args.length() == 2); 9669 ASSERT(args.length() == 2);
9662 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); 9670 CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
9663 CONVERT_ARG_HANDLE_CHECKED(JSArray, output, 1); 9671 CONVERT_ARG_HANDLE_CHECKED(JSArray, output, 1);
9664 9672
9673 RUNTIME_ASSERT(output->HasFastElements());
9665 JSObject::EnsureCanContainHeapObjectElements(output); 9674 JSObject::EnsureCanContainHeapObjectElements(output);
9666 RUNTIME_ASSERT(output->HasFastObjectElements()); 9675 RUNTIME_ASSERT(output->HasFastObjectElements());
9667 Handle<FixedArray> output_array(FixedArray::cast(output->elements())); 9676 Handle<FixedArray> output_array(FixedArray::cast(output->elements()));
9668 RUNTIME_ASSERT(output_array->length() >= DateParser::OUTPUT_SIZE); 9677 RUNTIME_ASSERT(output_array->length() >= DateParser::OUTPUT_SIZE);
9669 9678
9670 str = String::Flatten(str); 9679 str = String::Flatten(str);
9671 DisallowHeapAllocation no_gc; 9680 DisallowHeapAllocation no_gc;
9672 9681
9673 bool result; 9682 bool result;
9674 String::FlatContent str_content = str->GetFlatContent(); 9683 String::FlatContent str_content = str->GetFlatContent();
(...skipping 4859 matching lines...) Expand 10 before | Expand all | Expand 10 after
14534 return isolate->heap()->undefined_value(); 14543 return isolate->heap()->undefined_value();
14535 } 14544 }
14536 14545
14537 14546
14538 RUNTIME_FUNCTION(Runtime_LoadMutableDouble) { 14547 RUNTIME_FUNCTION(Runtime_LoadMutableDouble) {
14539 HandleScope scope(isolate); 14548 HandleScope scope(isolate);
14540 ASSERT(args.length() == 2); 14549 ASSERT(args.length() == 2);
14541 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 14550 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
14542 CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1); 14551 CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1);
14543 int idx = index->value() >> 1; 14552 int idx = index->value() >> 1;
14553 int inobject_properties = object->map()->inobject_properties();
14544 if (idx < 0) { 14554 if (idx < 0) {
14545 idx = -idx + object->map()->inobject_properties() - 1; 14555 idx = -idx + inobject_properties - 1;
14546 } 14556 }
14557 int max_idx = object->properties()->length() + inobject_properties;
14558 RUNTIME_ASSERT(idx < max_idx);
14547 Handle<Object> raw_value(object->RawFastPropertyAt(idx), isolate); 14559 Handle<Object> raw_value(object->RawFastPropertyAt(idx), isolate);
14548 RUNTIME_ASSERT(raw_value->IsNumber() || raw_value->IsUninitialized()); 14560 RUNTIME_ASSERT(raw_value->IsNumber() || raw_value->IsUninitialized());
14549 return *JSObject::FastPropertyAt(object, Representation::Double(), idx); 14561 return *Object::NewStorageFor(isolate, raw_value, Representation::Double());
14550 } 14562 }
14551 14563
14552 14564
14553 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { 14565 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) {
14554 HandleScope scope(isolate); 14566 HandleScope scope(isolate);
14555 ASSERT(args.length() == 1); 14567 ASSERT(args.length() == 1);
14556 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 14568 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
14557 if (!object->IsJSObject()) return Smi::FromInt(0); 14569 if (!object->IsJSObject()) return Smi::FromInt(0);
14558 Handle<JSObject> js_object = Handle<JSObject>::cast(object); 14570 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
14559 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); 14571 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
15122 } 15134 }
15123 return NULL; 15135 return NULL;
15124 } 15136 }
15125 15137
15126 15138
15127 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15139 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15128 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15140 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15129 } 15141 }
15130 15142
15131 } } // namespace v8::internal 15143 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698