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

Side by Side Diff: src/objects.h

Issue 359733004: Remove kDontInline and simplify compiler hints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/hydrogen.cc ('k') | src/objects-inl.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 7205 matching lines...) Expand 10 before | Expand all | Expand 10 after
7216 // the bind function. 7216 // the bind function.
7217 DECL_BOOLEAN_ACCESSORS(bound) 7217 DECL_BOOLEAN_ACCESSORS(bound)
7218 7218
7219 // Indicates that the function is anonymous (the name field can be set 7219 // Indicates that the function is anonymous (the name field can be set
7220 // through the API, which does not change this flag). 7220 // through the API, which does not change this flag).
7221 DECL_BOOLEAN_ACCESSORS(is_anonymous) 7221 DECL_BOOLEAN_ACCESSORS(is_anonymous)
7222 7222
7223 // Is this a function or top-level/eval code. 7223 // Is this a function or top-level/eval code.
7224 DECL_BOOLEAN_ACCESSORS(is_function) 7224 DECL_BOOLEAN_ACCESSORS(is_function)
7225 7225
7226 // Indicates that the function cannot be inlined.
7227 DECL_BOOLEAN_ACCESSORS(dont_inline)
7228
7229 // Indicates that code for this function cannot be cached. 7226 // Indicates that code for this function cannot be cached.
7230 DECL_BOOLEAN_ACCESSORS(dont_cache) 7227 DECL_BOOLEAN_ACCESSORS(dont_cache)
7231 7228
7232 // Indicates that code for this function cannot be flushed. 7229 // Indicates that code for this function cannot be flushed.
7233 DECL_BOOLEAN_ACCESSORS(dont_flush) 7230 DECL_BOOLEAN_ACCESSORS(dont_flush)
7234 7231
7235 // Indicates that this function is a generator. 7232 // Indicates that this function is a generator.
7236 DECL_BOOLEAN_ACCESSORS(is_generator) 7233 DECL_BOOLEAN_ACCESSORS(is_generator)
7237 7234
7238 // Indicates whether or not the code in the shared function support 7235 // Indicates whether or not the code in the shared function support
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
7280 // Stores opt_count and bailout_reason as bit-fields. 7277 // Stores opt_count and bailout_reason as bit-fields.
7281 inline void set_opt_count_and_bailout_reason(int value); 7278 inline void set_opt_count_and_bailout_reason(int value);
7282 inline int opt_count_and_bailout_reason() const; 7279 inline int opt_count_and_bailout_reason() const;
7283 7280
7284 void set_bailout_reason(BailoutReason reason) { 7281 void set_bailout_reason(BailoutReason reason) {
7285 set_opt_count_and_bailout_reason( 7282 set_opt_count_and_bailout_reason(
7286 DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(), 7283 DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(),
7287 reason)); 7284 reason));
7288 } 7285 }
7289 7286
7290 void set_dont_optimize_reason(BailoutReason reason) {
7291 set_bailout_reason(reason);
7292 set_dont_inline(reason != kNoReason);
7293 }
7294
7295 // Check whether or not this function is inlineable. 7287 // Check whether or not this function is inlineable.
7296 bool IsInlineable(); 7288 bool IsInlineable();
7297 7289
7298 // Source size of this function. 7290 // Source size of this function.
7299 int SourceSize(); 7291 int SourceSize();
7300 7292
7301 // Calculate the instance size. 7293 // Calculate the instance size.
7302 int CalculateInstanceSize(); 7294 int CalculateInstanceSize();
7303 7295
7304 // Calculate the number of in-object properties. 7296 // Calculate the number of in-object properties.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
7427 kOptimizationDisabled, 7419 kOptimizationDisabled,
7428 kStrictModeFunction, 7420 kStrictModeFunction,
7429 kUsesArguments, 7421 kUsesArguments,
7430 kHasDuplicateParameters, 7422 kHasDuplicateParameters,
7431 kNative, 7423 kNative,
7432 kInlineBuiltin, 7424 kInlineBuiltin,
7433 kBoundFunction, 7425 kBoundFunction,
7434 kIsAnonymous, 7426 kIsAnonymous,
7435 kNameShouldPrintAsAnonymous, 7427 kNameShouldPrintAsAnonymous,
7436 kIsFunction, 7428 kIsFunction,
7437 kDontInline,
7438 kDontCache, 7429 kDontCache,
7439 kDontFlush, 7430 kDontFlush,
7440 kIsGenerator, 7431 kIsGenerator,
7441 kCompilerHintsCount // Pseudo entry 7432 kCompilerHintsCount // Pseudo entry
7442 }; 7433 };
7443 7434
7444 class DeoptCountBits: public BitField<int, 0, 4> {}; 7435 class DeoptCountBits: public BitField<int, 0, 4> {};
7445 class OptReenableTriesBits: public BitField<int, 4, 18> {}; 7436 class OptReenableTriesBits: public BitField<int, 4, 18> {};
7446 class ICAgeBits: public BitField<int, 22, 8> {}; 7437 class ICAgeBits: public BitField<int, 22, 8> {};
7447 7438
(...skipping 3728 matching lines...) Expand 10 before | Expand all | Expand 10 after
11176 } else { 11167 } else {
11177 value &= ~(1 << bit_position); 11168 value &= ~(1 << bit_position);
11178 } 11169 }
11179 return value; 11170 return value;
11180 } 11171 }
11181 }; 11172 };
11182 11173
11183 } } // namespace v8::internal 11174 } } // namespace v8::internal
11184 11175
11185 #endif // V8_OBJECTS_H_ 11176 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698