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/objects-inl.h

Issue 669061: First take on custom call generators. (Closed)
Patch Set: Ultimate version Created 10 years, 9 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/objects-debug.cc ('k') | src/parser.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) 2354 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex)
2355 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) 2355 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex)
2356 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) 2356 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex)
2357 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 2357 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
2358 #endif 2358 #endif
2359 2359
2360 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 2360 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
2361 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 2361 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
2362 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 2362 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
2363 kInstanceClassNameOffset) 2363 kInstanceClassNameOffset)
2364 ACCESSORS(SharedFunctionInfo, function_data, Object, 2364 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
2365 kExternalReferenceDataOffset)
2366 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 2365 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
2367 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) 2366 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
2368 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) 2367 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
2369 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, 2368 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object,
2370 kThisPropertyAssignmentsOffset) 2369 kThisPropertyAssignmentsOffset)
2371 2370
2372 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, 2371 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
2373 kHiddenPrototypeBit) 2372 kHiddenPrototypeBit)
2374 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) 2373 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit)
2375 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, 2374 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); 2445 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode);
2447 } 2446 }
2448 2447
2449 2448
2450 bool SharedFunctionInfo::is_compiled() { 2449 bool SharedFunctionInfo::is_compiled() {
2451 // TODO(1242782): Create a code kind for uncompiled code. 2450 // TODO(1242782): Create a code kind for uncompiled code.
2452 return code()->kind() != Code::STUB; 2451 return code()->kind() != Code::STUB;
2453 } 2452 }
2454 2453
2455 2454
2455 bool SharedFunctionInfo::IsApiFunction() {
2456 return function_data()->IsFunctionTemplateInfo();
2457 }
2458
2459
2460 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
2461 ASSERT(IsApiFunction());
2462 return FunctionTemplateInfo::cast(function_data());
2463 }
2464
2465
2466 bool SharedFunctionInfo::HasCustomCallGenerator() {
2467 return function_data()->IsProxy();
2468 }
2469
2470
2456 bool JSFunction::IsBoilerplate() { 2471 bool JSFunction::IsBoilerplate() {
2457 return map() == Heap::boilerplate_function_map(); 2472 return map() == Heap::boilerplate_function_map();
2458 } 2473 }
2459 2474
2460 2475
2461 bool JSFunction::IsBuiltin() { 2476 bool JSFunction::IsBuiltin() {
2462 return context()->global()->IsJSBuiltinsObject(); 2477 return context()->global()->IsJSBuiltinsObject();
2463 } 2478 }
2464 2479
2465 2480
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
3062 #undef WRITE_INT_FIELD 3077 #undef WRITE_INT_FIELD
3063 #undef READ_SHORT_FIELD 3078 #undef READ_SHORT_FIELD
3064 #undef WRITE_SHORT_FIELD 3079 #undef WRITE_SHORT_FIELD
3065 #undef READ_BYTE_FIELD 3080 #undef READ_BYTE_FIELD
3066 #undef WRITE_BYTE_FIELD 3081 #undef WRITE_BYTE_FIELD
3067 3082
3068 3083
3069 } } // namespace v8::internal 3084 } } // namespace v8::internal
3070 3085
3071 #endif // V8_OBJECTS_INL_H_ 3086 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698