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

Unified Diff: lib/runtime/dart/_operations.js

Issue 1413683006: Move runtime js files down to lib/runtime/dart (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/_rtti.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_operations.js
diff --git a/lib/runtime/_operations.js b/lib/runtime/dart/_operations.js
similarity index 96%
rename from lib/runtime/_operations.js
rename to lib/runtime/dart/_operations.js
index b5a1743b1510ccfefecaadfa2e1ae04e133fe539..3b799250a065d763e45544c16a5c9c6dc45dfd0f 100644
--- a/lib/runtime/_operations.js
+++ b/lib/runtime/dart/_operations.js
@@ -5,16 +5,16 @@
/* This library defines runtime operations on objects used by the code
* generator.
*/
-dart_library.library('dart_runtime/_operations', null, /* Imports */[
+dart_library.library('dart/_operations', null, /* Imports */[
], /* Lazy Imports */[
'dart/async',
'dart/collection',
'dart/core',
'dart/_js_helper',
- 'dart_runtime/_classes',
- 'dart_runtime/_errors',
- 'dart_runtime/_rtti',
- 'dart_runtime/_types'
+ 'dart/_classes',
+ 'dart/_errors',
+ 'dart/_rtti',
+ 'dart/_types'
], function(exports, async, collection, core, _js_helper, classes, errors, rtti,
types) {
'use strict';
@@ -25,8 +25,6 @@ dart_library.library('dart_runtime/_operations', null, /* Imports */[
const getOwnPropertyNames = Object.getOwnPropertyNames;
const hasOwnProperty = Object.prototype.hasOwnProperty;
- const slice = [].slice;
-
function _canonicalFieldName(obj, name, args, displayName) {
name = classes.canonicalMember(obj, name);
if (name) return name;
@@ -143,8 +141,7 @@ dart_library.library('dart_runtime/_operations', null, /* Imports */[
throwNoSuchMethod(obj, name, args, f);
}
- function dcall(f/*, ...args*/) {
- let args = slice.call(arguments, 1);
+ function dcall(f, ...args) {
let ftype = rtti.read(f);
return checkAndCall(f, ftype, void 0, args, 'call');
}
@@ -158,8 +155,8 @@ dart_library.library('dart_runtime/_operations', null, /* Imports */[
return checkAndCall(f, ftype, obj, args, displayName);
}
- function dsend(obj, method/*, ...args*/) {
- return callMethod(obj, method, slice.call(arguments, 2), method);
+ function dsend(obj, method, ...args) {
+ return callMethod(obj, method, args, method);
}
exports.dsend = dsend;
@@ -335,8 +332,7 @@ dart_library.library('dart_runtime/_operations', null, /* Imports */[
* Will call each successive callback, unless one returns null, which stops
* the sequence.
*/
- function nullSafe(obj /*, ...callbacks*/) {
- let callbacks = slice.call(arguments, 1);
+ function nullSafe(obj, ...callbacks) {
if (obj == null) return obj;
for (const callback of callbacks) {
obj = callback(obj);
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/_rtti.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698