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

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

Issue 7491097: Revert "Revert "Fix a bug in scope analysis."" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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.h ('k') | src/parser.h » ('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 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after
3527 kOptimizationDisabled, 3527 kOptimizationDisabled,
3528 disable)); 3528 disable));
3529 // If disabling optimizations we reflect that in the code object so 3529 // If disabling optimizations we reflect that in the code object so
3530 // it will not be counted as optimizable code. 3530 // it will not be counted as optimizable code.
3531 if ((code()->kind() == Code::FUNCTION) && disable) { 3531 if ((code()->kind() == Code::FUNCTION) && disable) {
3532 code()->set_optimizable(false); 3532 code()->set_optimizable(false);
3533 } 3533 }
3534 } 3534 }
3535 3535
3536 3536
3537 BOOL_ACCESSORS(SharedFunctionInfo, 3537 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, strict_mode,
3538 compiler_hints,
3539 strict_mode,
3540 kStrictModeFunction) 3538 kStrictModeFunction)
3541 3539 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
3542 3540 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
3543 bool SharedFunctionInfo::native() { 3541 name_should_print_as_anonymous,
3544 return BooleanBit::get(compiler_hints(), kNative); 3542 kNameShouldPrintAsAnonymous)
3545 } 3543 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
3546 3544 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
3547
3548 void SharedFunctionInfo::set_native(bool value) {
3549 set_compiler_hints(BooleanBit::set(compiler_hints(),
3550 kNative,
3551 value));
3552 }
3553
3554
3555 bool SharedFunctionInfo::bound() {
3556 return BooleanBit::get(compiler_hints(), kBoundFunction);
3557 }
3558
3559
3560 void SharedFunctionInfo::set_bound(bool value) {
3561 set_compiler_hints(BooleanBit::set(compiler_hints(),
3562 kBoundFunction,
3563 value));
3564 }
3565
3566 3545
3567 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) 3546 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
3568 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) 3547 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
3569 3548
3570 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) 3549 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset)
3571 3550
3572 bool Script::HasValidSource() { 3551 bool Script::HasValidSource() {
3573 Object* src = this->source(); 3552 Object* src = this->source();
3574 if (!src->IsString()) return true; 3553 if (!src->IsString()) return true;
3575 String* src_str = String::cast(src); 3554 String* src_str = String::cast(src);
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4627 #undef WRITE_INT_FIELD 4606 #undef WRITE_INT_FIELD
4628 #undef READ_SHORT_FIELD 4607 #undef READ_SHORT_FIELD
4629 #undef WRITE_SHORT_FIELD 4608 #undef WRITE_SHORT_FIELD
4630 #undef READ_BYTE_FIELD 4609 #undef READ_BYTE_FIELD
4631 #undef WRITE_BYTE_FIELD 4610 #undef WRITE_BYTE_FIELD
4632 4611
4633 4612
4634 } } // namespace v8::internal 4613 } } // namespace v8::internal
4635 4614
4636 #endif // V8_OBJECTS_INL_H_ 4615 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698