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

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

Issue 509153003: New bigint implementation in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
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/unit_test.h" 5 #include "vm/unit_test.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag, 158 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag,
159 Dart_Handle library, 159 Dart_Handle library,
160 Dart_Handle url) { 160 Dart_Handle url) {
161 if (tag == Dart_kCanonicalizeUrl) { 161 if (tag == Dart_kCanonicalizeUrl) {
162 return url; 162 return url;
163 } 163 }
164 return Api::Success(); 164 return Api::Success();
165 } 165 }
166 166
167 167
168 char* TestCase::BigintToHexValue(Dart_CObject* bigint) {
169 return bin::CObject::BigintToHexValue(bigint);
170 }
171
172
168 void AssemblerTest::Assemble() { 173 void AssemblerTest::Assemble() {
169 const String& function_name = String::ZoneHandle(Symbols::New(name_)); 174 const String& function_name = String::ZoneHandle(Symbols::New(name_));
170 const Class& cls = Class::ZoneHandle( 175 const Class& cls = Class::ZoneHandle(
171 Class::New(function_name, Script::Handle(), Scanner::kNoSourcePos)); 176 Class::New(function_name, Script::Handle(), Scanner::kNoSourcePos));
172 const Library& lib = Library::ZoneHandle(Library::New(function_name)); 177 const Library& lib = Library::ZoneHandle(Library::New(function_name));
173 cls.set_library(lib); 178 cls.set_library(lib);
174 Function& function = Function::ZoneHandle( 179 Function& function = Function::ZoneHandle(
175 Function::New(function_name, RawFunction::kRegularFunction, 180 Function::New(function_name, RawFunction::kRegularFunction,
176 true, false, false, false, false, cls, 0)); 181 true, false, false, false, false, cls, 0));
177 code_ = Code::FinalizeCode(function, assembler_); 182 code_ = Code::FinalizeCode(function, assembler_);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 Isolate* isolate = Isolate::Current(); 261 Isolate* isolate = Isolate::Current();
257 ASSERT(isolate != NULL); 262 ASSERT(isolate != NULL);
258 ASSERT(ClassFinalizer::AllClassesFinalized()); 263 ASSERT(ClassFinalizer::AllClassesFinalized());
259 const Error& error = Error::Handle(Compiler::CompileFunction(isolate, 264 const Error& error = Error::Handle(Compiler::CompileFunction(isolate,
260 function)); 265 function));
261 return error.IsNull(); 266 return error.IsNull();
262 } 267 }
263 268
264 269
265 } // namespace dart 270 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698