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

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

Issue 5753005: Make closures optimizable by Crankshaft compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 Code* SharedFunctionInfo::code() { 2977 Code* SharedFunctionInfo::code() {
2978 return Code::cast(READ_FIELD(this, kCodeOffset)); 2978 return Code::cast(READ_FIELD(this, kCodeOffset));
2979 } 2979 }
2980 2980
2981 2981
2982 Code* SharedFunctionInfo::unchecked_code() { 2982 Code* SharedFunctionInfo::unchecked_code() {
2983 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); 2983 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset));
2984 } 2984 }
2985 2985
2986 2986
2987 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { 2987 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
fschneider 2010/12/13 19:00:18 I'm not sure why is this assert not needed anymore
antonm 2010/12/13 22:41:04 My reasoning: before only functions which allowed
2988 // If optimization has been disabled for the shared function info,
2989 // reflect that in the code object so it will not be counted as
2990 // optimizable code.
2991 ASSERT(value->kind() != Code::FUNCTION ||
2992 !value->optimizable() ||
2993 this->code() == Builtins::builtin(Builtins::Illegal) ||
2994 this->allows_lazy_compilation());
2995 WRITE_FIELD(this, kCodeOffset, value); 2988 WRITE_FIELD(this, kCodeOffset, value);
2996 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); 2989 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode);
2997 } 2990 }
2998 2991
2999 2992
3000 SerializedScopeInfo* SharedFunctionInfo::scope_info() { 2993 SerializedScopeInfo* SharedFunctionInfo::scope_info() {
3001 return reinterpret_cast<SerializedScopeInfo*>( 2994 return reinterpret_cast<SerializedScopeInfo*>(
3002 READ_FIELD(this, kScopeInfoOffset)); 2995 READ_FIELD(this, kScopeInfoOffset));
3003 } 2996 }
3004 2997
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 #undef WRITE_INT_FIELD 3845 #undef WRITE_INT_FIELD
3853 #undef READ_SHORT_FIELD 3846 #undef READ_SHORT_FIELD
3854 #undef WRITE_SHORT_FIELD 3847 #undef WRITE_SHORT_FIELD
3855 #undef READ_BYTE_FIELD 3848 #undef READ_BYTE_FIELD
3856 #undef WRITE_BYTE_FIELD 3849 #undef WRITE_BYTE_FIELD
3857 3850
3858 3851
3859 } } // namespace v8::internal 3852 } } // namespace v8::internal
3860 3853
3861 #endif // V8_OBJECTS_INL_H_ 3854 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698