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

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

Issue 7187007: Merge arguments branch to bleeding edge (second try). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Undelete external-array test. Created 9 years, 6 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/objects.cc ('k') | src/objects-printer.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 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 638
639 639
640 bool Object::IsHashTable() { 640 bool Object::IsHashTable() {
641 return Object::IsHeapObject() && 641 return Object::IsHeapObject() &&
642 HeapObject::cast(this)->map() == 642 HeapObject::cast(this)->map() ==
643 HeapObject::cast(this)->GetHeap()->hash_table_map(); 643 HeapObject::cast(this)->GetHeap()->hash_table_map();
644 } 644 }
645 645
646 646
647 bool Object::IsDictionary() { 647 bool Object::IsDictionary() {
648 return IsHashTable() && this != 648 return IsHashTable() &&
649 HeapObject::cast(this)->GetHeap()->symbol_table(); 649 this != HeapObject::cast(this)->GetHeap()->symbol_table();
650 } 650 }
651 651
652 652
653 bool Object::IsSymbolTable() { 653 bool Object::IsSymbolTable() {
654 return IsHashTable() && this == 654 return IsHashTable() && this ==
655 HeapObject::cast(this)->GetHeap()->raw_unchecked_symbol_table(); 655 HeapObject::cast(this)->GetHeap()->raw_unchecked_symbol_table();
656 } 656 }
657 657
658 658
659 bool Object::IsJSFunctionResultCache() { 659 bool Object::IsJSFunctionResultCache() {
(...skipping 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 3281
3282 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, 3282 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
3283 kHiddenPrototypeBit) 3283 kHiddenPrototypeBit)
3284 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) 3284 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit)
3285 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, 3285 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check,
3286 kNeedsAccessCheckBit) 3286 kNeedsAccessCheckBit)
3287 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, 3287 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression,
3288 kIsExpressionBit) 3288 kIsExpressionBit)
3289 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_toplevel, 3289 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_toplevel,
3290 kIsTopLevelBit) 3290 kIsTopLevelBit)
3291 BOOL_GETTER(SharedFunctionInfo, compiler_hints, 3291 BOOL_GETTER(SharedFunctionInfo,
3292 compiler_hints,
3292 has_only_simple_this_property_assignments, 3293 has_only_simple_this_property_assignments,
3293 kHasOnlySimpleThisPropertyAssignments) 3294 kHasOnlySimpleThisPropertyAssignments)
3294 BOOL_ACCESSORS(SharedFunctionInfo, 3295 BOOL_ACCESSORS(SharedFunctionInfo,
3295 compiler_hints, 3296 compiler_hints,
3296 allows_lazy_compilation, 3297 allows_lazy_compilation,
3297 kAllowLazyCompilation) 3298 kAllowLazyCompilation)
3299 BOOL_ACCESSORS(SharedFunctionInfo,
3300 compiler_hints,
3301 uses_arguments,
3302 kUsesArguments)
3303 BOOL_ACCESSORS(SharedFunctionInfo,
3304 compiler_hints,
3305 has_duplicate_parameters,
3306 kHasDuplicateParameters)
3298 3307
3299 3308
3300 #if V8_HOST_ARCH_32_BIT 3309 #if V8_HOST_ARCH_32_BIT
3301 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) 3310 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
3302 SMI_ACCESSORS(SharedFunctionInfo, formal_parameter_count, 3311 SMI_ACCESSORS(SharedFunctionInfo, formal_parameter_count,
3303 kFormalParameterCountOffset) 3312 kFormalParameterCountOffset)
3304 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, 3313 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties,
3305 kExpectedNofPropertiesOffset) 3314 kExpectedNofPropertiesOffset)
3306 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) 3315 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
3307 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type, 3316 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 return READ_BYTE_FIELD(this, kConstructionCountOffset); 3380 return READ_BYTE_FIELD(this, kConstructionCountOffset);
3372 } 3381 }
3373 3382
3374 3383
3375 void SharedFunctionInfo::set_construction_count(int value) { 3384 void SharedFunctionInfo::set_construction_count(int value) {
3376 ASSERT(0 <= value && value < 256); 3385 ASSERT(0 <= value && value < 256);
3377 WRITE_BYTE_FIELD(this, kConstructionCountOffset, static_cast<byte>(value)); 3386 WRITE_BYTE_FIELD(this, kConstructionCountOffset, static_cast<byte>(value));
3378 } 3387 }
3379 3388
3380 3389
3381 bool SharedFunctionInfo::live_objects_may_exist() { 3390 BOOL_ACCESSORS(SharedFunctionInfo,
3382 return (compiler_hints() & (1 << kLiveObjectsMayExist)) != 0; 3391 compiler_hints,
3383 } 3392 live_objects_may_exist,
3384 3393 kLiveObjectsMayExist)
3385
3386 void SharedFunctionInfo::set_live_objects_may_exist(bool value) {
3387 if (value) {
3388 set_compiler_hints(compiler_hints() | (1 << kLiveObjectsMayExist));
3389 } else {
3390 set_compiler_hints(compiler_hints() & ~(1 << kLiveObjectsMayExist));
3391 }
3392 }
3393 3394
3394 3395
3395 bool SharedFunctionInfo::IsInobjectSlackTrackingInProgress() { 3396 bool SharedFunctionInfo::IsInobjectSlackTrackingInProgress() {
3396 return initial_map() != HEAP->undefined_value(); 3397 return initial_map() != HEAP->undefined_value();
3397 } 3398 }
3398 3399
3399 3400
3400 bool SharedFunctionInfo::optimization_disabled() { 3401 BOOL_GETTER(SharedFunctionInfo,
3401 return BooleanBit::get(compiler_hints(), kOptimizationDisabled); 3402 compiler_hints,
3402 } 3403 optimization_disabled,
3404 kOptimizationDisabled)
3403 3405
3404 3406
3405 void SharedFunctionInfo::set_optimization_disabled(bool disable) { 3407 void SharedFunctionInfo::set_optimization_disabled(bool disable) {
3406 set_compiler_hints(BooleanBit::set(compiler_hints(), 3408 set_compiler_hints(BooleanBit::set(compiler_hints(),
3407 kOptimizationDisabled, 3409 kOptimizationDisabled,
3408 disable)); 3410 disable));
3409 // If disabling optimizations we reflect that in the code object so 3411 // If disabling optimizations we reflect that in the code object so
3410 // it will not be counted as optimizable code. 3412 // it will not be counted as optimizable code.
3411 if ((code()->kind() == Code::FUNCTION) && disable) { 3413 if ((code()->kind() == Code::FUNCTION) && disable) {
3412 code()->set_optimizable(false); 3414 code()->set_optimizable(false);
3413 } 3415 }
3414 } 3416 }
3415 3417
3416 3418
3417 bool SharedFunctionInfo::strict_mode() { 3419 BOOL_ACCESSORS(SharedFunctionInfo,
3418 return BooleanBit::get(compiler_hints(), kStrictModeFunction); 3420 compiler_hints,
3419 } 3421 strict_mode,
3420 3422 kStrictModeFunction)
3421
3422 void SharedFunctionInfo::set_strict_mode(bool value) {
3423 set_compiler_hints(BooleanBit::set(compiler_hints(),
3424 kStrictModeFunction,
3425 value));
3426 }
3427 3423
3428 3424
3429 bool SharedFunctionInfo::native() { 3425 bool SharedFunctionInfo::native() {
3430 return BooleanBit::get(compiler_hints(), kNative); 3426 return BooleanBit::get(compiler_hints(), kNative);
3431 } 3427 }
3432 3428
3433 3429
3434 void SharedFunctionInfo::set_native(bool value) { 3430 void SharedFunctionInfo::set_native(bool value) {
3435 set_compiler_hints(BooleanBit::set(compiler_hints(), 3431 set_compiler_hints(BooleanBit::set(compiler_hints(),
3436 kNative, 3432 kNative,
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 #undef WRITE_INT_FIELD 4418 #undef WRITE_INT_FIELD
4423 #undef READ_SHORT_FIELD 4419 #undef READ_SHORT_FIELD
4424 #undef WRITE_SHORT_FIELD 4420 #undef WRITE_SHORT_FIELD
4425 #undef READ_BYTE_FIELD 4421 #undef READ_BYTE_FIELD
4426 #undef WRITE_BYTE_FIELD 4422 #undef WRITE_BYTE_FIELD
4427 4423
4428 4424
4429 } } // namespace v8::internal 4425 } } // namespace v8::internal
4430 4426
4431 #endif // V8_OBJECTS_INL_H_ 4427 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698