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

Side by Side Diff: runtime/vm/object.cc

Issue 9965081: Detect recursion during compilation of const constructors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/object.h ('k') | runtime/vm/raw_object.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 3575 matching lines...) Expand 10 before | Expand all | Expand 10 after
3586 result.set_kind(kind); 3586 result.set_kind(kind);
3587 result.set_is_static(is_static); 3587 result.set_is_static(is_static);
3588 result.set_is_const(is_const); 3588 result.set_is_const(is_const);
3589 result.set_token_index(token_index); 3589 result.set_token_index(token_index);
3590 result.set_end_token_index(token_index); 3590 result.set_end_token_index(token_index);
3591 result.set_num_fixed_parameters(0); 3591 result.set_num_fixed_parameters(0);
3592 result.set_num_optional_parameters(0); 3592 result.set_num_optional_parameters(0);
3593 result.set_usage_counter(0); 3593 result.set_usage_counter(0);
3594 result.set_deoptimization_counter(0); 3594 result.set_deoptimization_counter(0);
3595 result.set_is_optimizable(true); 3595 result.set_is_optimizable(true);
3596 result.set_is_compiling(false);
3596 return result.raw(); 3597 return result.raw();
3597 } 3598 }
3598 3599
3599 3600
3600 RawFunction* Function::NewClosureFunction(const String& name, 3601 RawFunction* Function::NewClosureFunction(const String& name,
3601 const Function& parent, 3602 const Function& parent,
3602 intptr_t token_index) { 3603 intptr_t token_index) {
3603 ASSERT(!parent.IsNull()); 3604 ASSERT(!parent.IsNull());
3604 const Class& parent_class = Class::Handle(parent.owner()); 3605 const Class& parent_class = Class::Handle(parent.owner());
3605 ASSERT(!parent_class.IsNull()); 3606 ASSERT(!parent_class.IsNull());
(...skipping 5440 matching lines...) Expand 10 before | Expand all | Expand 10 after
9046 const String& str = String::Handle(pattern()); 9047 const String& str = String::Handle(pattern());
9047 const char* format = "JSRegExp: pattern=%s flags=%s"; 9048 const char* format = "JSRegExp: pattern=%s flags=%s";
9048 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 9049 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
9049 char* chars = reinterpret_cast<char*>( 9050 char* chars = reinterpret_cast<char*>(
9050 Isolate::Current()->current_zone()->Allocate(len + 1)); 9051 Isolate::Current()->current_zone()->Allocate(len + 1));
9051 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 9052 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
9052 return chars; 9053 return chars;
9053 } 9054 }
9054 9055
9055 } // namespace dart 9056 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698