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

Side by Side Diff: src/objects-inl.h

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: 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 | Annotate | Revision Log
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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 double HeapNumber::value() { 1114 double HeapNumber::value() {
1115 return READ_DOUBLE_FIELD(this, kValueOffset); 1115 return READ_DOUBLE_FIELD(this, kValueOffset);
1116 } 1116 }
1117 1117
1118 1118
1119 void HeapNumber::set_value(double value) { 1119 void HeapNumber::set_value(double value) {
1120 WRITE_DOUBLE_FIELD(this, kValueOffset, value); 1120 WRITE_DOUBLE_FIELD(this, kValueOffset, value);
1121 } 1121 }
1122 1122
1123 1123
1124 int HeapNumber::get_exponent() {
1125 return ((READ_INT_FIELD(this, kExponentOffset) & kExponentMask) >>
1126 kExponentShift) - kExponentBias;
1127 }
1128
1129
1130 int HeapNumber::get_sign() {
1131 return READ_INT_FIELD(this, kExponentOffset) & kSignMask;
1132 }
1133
1134
1124 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) 1135 ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset)
1125 1136
1126 1137
1127 Array* JSObject::elements() { 1138 Array* JSObject::elements() {
1128 Object* array = READ_FIELD(this, kElementsOffset); 1139 Object* array = READ_FIELD(this, kElementsOffset);
1129 // In the assert below Dictionary is covered under FixedArray. 1140 // In the assert below Dictionary is covered under FixedArray.
1130 ASSERT(array->IsFixedArray() || array->IsPixelArray() || 1141 ASSERT(array->IsFixedArray() || array->IsPixelArray() ||
1131 array->IsExternalArray()); 1142 array->IsExternalArray());
1132 return reinterpret_cast<Array*>(array); 1143 return reinterpret_cast<Array*>(array);
1133 } 1144 }
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) 2365 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex)
2355 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) 2366 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex)
2356 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) 2367 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex)
2357 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 2368 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
2358 #endif 2369 #endif
2359 2370
2360 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 2371 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
2361 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 2372 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
2362 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 2373 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
2363 kInstanceClassNameOffset) 2374 kInstanceClassNameOffset)
2364 ACCESSORS(SharedFunctionInfo, function_data, Object, 2375 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
2365 kExternalReferenceDataOffset)
2366 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 2376 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
2367 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) 2377 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
2368 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) 2378 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
2369 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, 2379 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object,
2370 kThisPropertyAssignmentsOffset) 2380 kThisPropertyAssignmentsOffset)
2371 2381
2372 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, 2382 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
2373 kHiddenPrototypeBit) 2383 kHiddenPrototypeBit)
2374 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) 2384 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit)
2375 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, 2385 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); 2456 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode);
2447 } 2457 }
2448 2458
2449 2459
2450 bool SharedFunctionInfo::is_compiled() { 2460 bool SharedFunctionInfo::is_compiled() {
2451 // TODO(1242782): Create a code kind for uncompiled code. 2461 // TODO(1242782): Create a code kind for uncompiled code.
2452 return code()->kind() != Code::STUB; 2462 return code()->kind() != Code::STUB;
2453 } 2463 }
2454 2464
2455 2465
2466 bool SharedFunctionInfo::IsApiFunction() {
2467 return function_data()->IsFunctionTemplateInfo();
2468 }
2469
2470
2471 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
2472 ASSERT(IsApiFunction());
2473 return FunctionTemplateInfo::cast(function_data());
2474 }
2475
2476
2477 bool SharedFunctionInfo::HasCustomCallGenerator() {
2478 return function_data()->IsProxy();
2479 }
2480
2481
2456 bool JSFunction::IsBoilerplate() { 2482 bool JSFunction::IsBoilerplate() {
2457 return map() == Heap::boilerplate_function_map(); 2483 return map() == Heap::boilerplate_function_map();
2458 } 2484 }
2459 2485
2460 2486
2461 bool JSFunction::IsBuiltin() { 2487 bool JSFunction::IsBuiltin() {
2462 return context()->global()->IsJSBuiltinsObject(); 2488 return context()->global()->IsJSBuiltinsObject();
2463 } 2489 }
2464 2490
2465 2491
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3057 #undef WRITE_INT_FIELD 3083 #undef WRITE_INT_FIELD
3058 #undef READ_SHORT_FIELD 3084 #undef READ_SHORT_FIELD
3059 #undef WRITE_SHORT_FIELD 3085 #undef WRITE_SHORT_FIELD
3060 #undef READ_BYTE_FIELD 3086 #undef READ_BYTE_FIELD
3061 #undef WRITE_BYTE_FIELD 3087 #undef WRITE_BYTE_FIELD
3062 3088
3063 3089
3064 } } // namespace v8::internal 3090 } } // namespace v8::internal
3065 3091
3066 #endif // V8_OBJECTS_INL_H_ 3092 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698